diff --git a/rpcsx-gpu/lib/amdgpu-tiler/shaders/detiler1d.comp.glsl b/rpcsx-gpu/lib/amdgpu-tiler/shaders/detiler1d.comp.glsl index e60dc02d..bc4eaa26 100644 --- a/rpcsx-gpu/lib/amdgpu-tiler/shaders/detiler1d.comp.glsl +++ b/rpcsx-gpu/lib/amdgpu-tiler/shaders/detiler1d.comp.glsl @@ -47,6 +47,10 @@ void main() { uint32_t bpp = (config.bitsPerElement + 7) / 8; + if (bpp == 1 && (linearByteOffset & 1) != 0) { + return; + } + if (config.srcAddress + tiledByteOffset + bpp > config.srcEndAddress) { debugPrintfEXT("detiler1d: out of src buffer %d x %d x %d", pos.x, pos.y, pos.z); return; @@ -59,9 +63,6 @@ void main() { switch (bpp) { case 1: - buffer_reference_uint8_t(config.dstAddress + linearByteOffset).data = buffer_reference_uint8_t(config.srcAddress + tiledByteOffset).data; - break; - case 2: buffer_reference_uint16_t(config.dstAddress + linearByteOffset).data = buffer_reference_uint16_t(config.srcAddress + tiledByteOffset).data; break; diff --git a/rpcsx-gpu/lib/amdgpu-tiler/shaders/tiler1d.comp.glsl b/rpcsx-gpu/lib/amdgpu-tiler/shaders/tiler1d.comp.glsl index d23be7ba..30a092f9 100644 --- a/rpcsx-gpu/lib/amdgpu-tiler/shaders/tiler1d.comp.glsl +++ b/rpcsx-gpu/lib/amdgpu-tiler/shaders/tiler1d.comp.glsl @@ -50,6 +50,11 @@ void main() { uint32_t bpp = (config.bitsPerElement + 7) / 8; + if (bpp == 1 && (linearByteOffset & 1) != 0) { + return; + } + + #ifdef DEBUG if (config.srcAddress + linearByteOffset + bpp > config.srcEndAddress) { debugPrintfEXT("tiler1d: out of src buffer %d x %d x %d", pos.x, pos.y, pos.z); @@ -64,9 +69,6 @@ void main() { switch (bpp) { case 1: - buffer_reference_uint8_t(config.dstAddress + tiledByteOffset).data = buffer_reference_uint8_t(config.srcAddress + linearByteOffset).data; - break; - case 2: buffer_reference_uint16_t(config.dstAddress + tiledByteOffset).data = buffer_reference_uint16_t(config.srcAddress + linearByteOffset).data; break;