2 Star 1 Fork 3

sandman/d3d11_ocl_sharing

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
OpenCLRGBAFile.cl 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
sandman 提交于 2021-12-14 15:55 . update OpenCLRGBAFile.cl.
// Copyright (c) 2009-2015 Intel Corporation
// All rights reserved.
//
// WARRANTY DISCLAIMER
//
// THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
// MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Intel Corporation is the author of the Materials, and requests that all
// problem reports or change requests be submitted to it directly
// OpenCL kernel to perform an element-wise addition
kernel void drawBox_Y( __write_only image2d_t output, int top, int left, float fDimmerSwitch)
{
int x = get_global_id(0)+left;
int y = get_global_id(1)+top;
int xMin = 0, xMax = 1, yMin = 0, yMax = 1;
{
write_imagef(output, (int2)(x, y), (float4)(fDimmerSwitch, 0.f, 0.f, 1.f));
}
}
kernel void drawBox_UV( __write_only image2d_t output, int top, int left,float fDimmerSwitch)
{
int x = get_global_id(0)+left/2;
int y = get_global_id(1)+top/2;
fDimmerSwitch = 128.0f;
int xMin = 0, xMax = 1, yMin = 0, yMax = 1;
{
write_imagef(output, (int2)(x, y), (float4)(0.5f, 0.5f, 0.f, 1.f));
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/tisandman/d3d11_ocl_sharing.git
git@gitee.com:tisandman/d3d11_ocl_sharing.git
tisandman
d3d11_ocl_sharing
d3d11_ocl_sharing
master

搜索帮助