diff --git a/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp b/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp index 53d44fbed7..be2b94db36 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12VertexProgramDecompiler.cpp @@ -44,7 +44,7 @@ namespace { if (static_cast(real_input.location) != std::get<0>(attribute)) continue; - OS << "Buffer " << std::get<1>(attribute) << "_buffer : register(t" << reg++ << ");\n"; + OS << "Buffer<" << (real_input.int_type ? "int4" : "float4") << "> " << std::get<1>(attribute) << "_buffer : register(t" << reg++ << ");\n"; return true; } return false; diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 1bfe3ff924..2c48036c73 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -568,6 +568,25 @@ namespace rsx } } + namespace + { + bool is_int_type(rsx::vertex_base_type type) + { + switch (type) + { + case rsx::vertex_base_type::s32k: + case rsx::vertex_base_type::ub256: + return true; + case rsx::vertex_base_type::f: + case rsx::vertex_base_type::cmp: + case rsx::vertex_base_type::sf: + case rsx::vertex_base_type::s1: + case rsx::vertex_base_type::ub: + return false; + } + } + } + std::array thread::get_color_surface_addresses() const { u32 offset_color[] = @@ -636,7 +655,8 @@ namespace rsx vertex_arrays_info[index].size, vertex_arrays_info[index].frequency, !!((modulo_mask >> index) & 0x1), - true + true, + is_int_type(vertex_arrays_info[index].type) } ); } @@ -648,7 +668,8 @@ namespace rsx register_vertex_info[index].size, register_vertex_info[index].frequency, !!((modulo_mask >> index) & 0x1), - false + false, + is_int_type(vertex_arrays_info[index].type) } ); } diff --git a/rpcs3/Emu/RSX/RSXVertexProgram.h b/rpcs3/Emu/RSX/RSXVertexProgram.h index 94f8198d8d..ba8d7fe875 100644 --- a/rpcs3/Emu/RSX/RSXVertexProgram.h +++ b/rpcs3/Emu/RSX/RSXVertexProgram.h @@ -197,10 +197,11 @@ struct rsx_vertex_input u16 frequency; bool is_modulo; // either modulo frequency or divide frequency bool is_array; // false if "reg value" + bool int_type; bool operator==(const rsx_vertex_input other) const { - return location == other.location && size == other.size && frequency == other.frequency && is_modulo == other.is_modulo && is_array == other.is_array; + return location == other.location && size == other.size && frequency == other.frequency && is_modulo == other.is_modulo && is_array == other.is_array && int_type == other.int_type; } };