mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
tiler: avoid usage of 8 bit types in 1d tiler
This commit is contained in:
parent
60cecf4fbc
commit
995c982923
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue