Fix incorrect offset reading integer texture sampling results on D3D

This commit is contained in:
baldurk
2022-08-10 14:56:44 +01:00
parent 855ad1afed
commit cbb8399d3e
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1255,8 +1255,8 @@ bool D3D11DebugAPIWrapper::CalculateSampleGather(
ShaderVariable lookupResult("tex", 0.0f, 0.0f, 0.0f, 0.0f);
float *retFloats = (float *)mapped.pData;
uint32_t *retUInts = (uint32_t *)(retFloats + 16);
int32_t *retSInts = (int32_t *)(retUInts + 16);
uint32_t *retUInts = (uint32_t *)(retFloats + 8);
int32_t *retSInts = (int32_t *)(retUInts + 8);
if(cbufferData.debugSampleRetType == DEBUG_SAMPLE_UINT)
{
+2 -2
View File
@@ -1288,8 +1288,8 @@ bool D3D12DebugAPIWrapper::CalculateSampleGather(
ShaderVariable lookupResult("tex", 0.0f, 0.0f, 0.0f, 0.0f);
float *retFloats = (float *)results;
uint32_t *retUInts = (uint32_t *)(retFloats + 16);
int32_t *retSInts = (int32_t *)(retUInts + 16);
uint32_t *retUInts = (uint32_t *)(retFloats + 8);
int32_t *retSInts = (int32_t *)(retUInts + 8);
if(cbufferData.debugSampleRetType == DEBUG_SAMPLE_UINT)
{