mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Workaround compile error on old fxc's using .sample on 2DMS texture
This commit is contained in:
@@ -65,19 +65,19 @@ RWBuffer<int> copyout_int : register(u4);
|
||||
{
|
||||
if(copy_depth)
|
||||
{
|
||||
float val = copyin_depth_ms.sample[src_coord.z][uint3(src_coord.xy, src_coord.w)];
|
||||
float val = copyin_depth_ms.Load(uint3(src_coord.xy, src_coord.w), src_coord.z);
|
||||
copyout_depth[dst_slot] = val;
|
||||
}
|
||||
else if(copy_stencil)
|
||||
{
|
||||
uint val = copyin_stencil_ms.sample[src_coord.z][uint3(src_coord.xy, src_coord.w)].g;
|
||||
uint val = copyin_stencil_ms.Load(uint3(src_coord.xy, src_coord.w), src_coord.z).g;
|
||||
copyout_stencil[dst_slot] = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(is_float)
|
||||
{
|
||||
float4 val = copyin_float_ms.sample[src_coord.z][uint3(src_coord.xy, src_coord.w)];
|
||||
float4 val = copyin_float_ms.Load(uint3(src_coord.xy, src_coord.w), src_coord.z);
|
||||
copyout_float[dst_slot] = val.x;
|
||||
copyout_float[dst_slot + 1] = val.y;
|
||||
copyout_float[dst_slot + 2] = val.z;
|
||||
@@ -85,7 +85,7 @@ RWBuffer<int> copyout_int : register(u4);
|
||||
}
|
||||
else if(is_uint)
|
||||
{
|
||||
uint4 val = copyin_uint_ms.sample[src_coord.z][uint3(src_coord.xy, src_coord.w)];
|
||||
uint4 val = copyin_uint_ms.Load(uint3(src_coord.xy, src_coord.w), src_coord.z);
|
||||
copyout_uint[dst_slot] = val.x;
|
||||
copyout_uint[dst_slot + 1] = val.y;
|
||||
copyout_uint[dst_slot + 2] = val.z;
|
||||
@@ -93,7 +93,7 @@ RWBuffer<int> copyout_int : register(u4);
|
||||
}
|
||||
else if(is_int)
|
||||
{
|
||||
int4 val = copyin_int_ms.sample[src_coord.z][uint3(src_coord.xy, src_coord.w)];
|
||||
int4 val = copyin_int_ms.Load(uint3(src_coord.xy, src_coord.w), src_coord.z);
|
||||
copyout_int[dst_slot] = val.x;
|
||||
copyout_int[dst_slot + 1] = val.y;
|
||||
copyout_int[dst_slot + 2] = val.z;
|
||||
|
||||
@@ -70,10 +70,10 @@ RWBuffer<int4> copyout_int : register(u3);
|
||||
if(copy_depth || copy_stencil)
|
||||
{
|
||||
float2 val =
|
||||
float2(copyin_depth_ms.sample[src_coord.z][uint3(src_coord.xy, src_coord.w)].r, -1.0f);
|
||||
float2(copyin_depth_ms.Load(uint3(src_coord.xy, src_coord.w), src_coord.z).r, -1.0f);
|
||||
|
||||
if(copy_stencil)
|
||||
val.g = (float)copyin_stencil_ms.sample[src_coord.z][uint3(src_coord.xy, src_coord.w)].g;
|
||||
if(c opy_stencil)
|
||||
val.g = (float)copyin_stencil_ms.Load(uint3(src_coord.xy, src_coord.w), src_coord.z).g;
|
||||
|
||||
copyout_depth[dst_slot] = float4(val, 0.0f, 0.0f);
|
||||
}
|
||||
@@ -81,16 +81,15 @@ RWBuffer<int4> copyout_int : register(u3);
|
||||
{
|
||||
if(is_float)
|
||||
{
|
||||
copyout_float[dst_slot] =
|
||||
copyin_float_ms.sample[src_coord.z][uint3(src_coord.xy, src_coord.w)];
|
||||
copyout_float[dst_slot] = copyin_float_ms.Load(uint3(src_coord.xy, src_coord.w), src_coord.z);
|
||||
}
|
||||
else if(is_uint)
|
||||
{
|
||||
copyout_uint[dst_slot] = copyin_uint_ms.sample[src_coord.z][uint3(src_coord.xy, src_coord.w)];
|
||||
copyout_uint[dst_slot] = copyin_uint_ms.Load(uint3(src_coord.xy, src_coord.w), src_coord.z);
|
||||
}
|
||||
else if(is_int)
|
||||
{
|
||||
copyout_int[dst_slot] = copyin_int_ms.sample[src_coord.z][uint3(src_coord.xy, src_coord.w)];
|
||||
copyout_int[dst_slot] = copyin_int_ms.Load(uint3(src_coord.xy, src_coord.w), src_coord.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user