1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-01 07:14:31 +00:00
wine/dlls/wined3d/cs_uav_clear_2d_float_code.hlsl
2024-06-27 11:27:55 +02:00

34 lines
1.1 KiB
HLSL

/*
* Copyright 2019 Philip Rebohle
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
RWTexture2D<float4> dst;
struct
{
float4 clear_value;
int2 dst_offset;
int2 dst_extent;
} u_info;
[numthreads(8, 8, 1)]
void main(int3 thread_id : SV_DispatchThreadID)
{
if (all(thread_id.xy < u_info.dst_extent.xy))
dst[u_info.dst_offset.xy + thread_id.xy] = u_info.clear_value;
}