From 27807f3a618fd02f81007838427dd857fdef1a50 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Mon, 30 Nov 2015 20:16:24 +0100 Subject: [PATCH] d3d12: D8R8G8B8 and A8R8G8B8 are essentially the same. --- rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp index 397141154f..bea41ccce2 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp @@ -239,6 +239,7 @@ void D3D12GSRender::upload_and_bind_textures(ID3D12GraphicsCommandList *command_ shared_resource_view_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; break; case CELL_GCM_TEXTURE_A8R8G8B8: + case CELL_GCM_TEXTURE_D8R8G8B8: { @@ -312,28 +313,6 @@ void D3D12GSRender::upload_and_bind_textures(ID3D12GraphicsCommandList *command_ case CELL_GCM_TEXTURE_D1R5G5B5: shared_resource_view_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; break; - case CELL_GCM_TEXTURE_D8R8G8B8: - { - const int RemapValue[4] = - { - D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1, - D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2, - D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3, - D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1 - }; - - u8 remap_a = textures[i].remap() & 0x3; - u8 remap_r = (textures[i].remap() >> 2) & 0x3; - u8 remap_g = (textures[i].remap() >> 4) & 0x3; - u8 remap_b = (textures[i].remap() >> 6) & 0x3; - - shared_resource_view_desc.Shader4ComponentMapping = D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING( - RemapValue[remap_a], - RemapValue[remap_r], - RemapValue[remap_g], - RemapValue[remap_b]); - break; - } case CELL_GCM_TEXTURE_Y16_X16_FLOAT: shared_resource_view_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; break;