diff --git a/src/xenia/gpu/d3d12/d3d12_command_processor.cc b/src/xenia/gpu/d3d12/d3d12_command_processor.cc index 316181c7b..f8a7bc562 100644 --- a/src/xenia/gpu/d3d12/d3d12_command_processor.cc +++ b/src/xenia/gpu/d3d12/d3d12_command_processor.cc @@ -229,7 +229,7 @@ ID3D12RootSignature* D3D12CommandProcessor::GetRootSignature( range.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV; range.NumDescriptors = 1; range.BaseShaderRegister = 0; - range.RegisterSpace = 1; + range.RegisterSpace = 0; range.OffsetInDescriptorsFromTableStart = 0; } @@ -277,7 +277,7 @@ ID3D12RootSignature* D3D12CommandProcessor::GetRootSignature( parameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_VERTEX; range.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV; range.NumDescriptors = vertex_texture_count; - range.BaseShaderRegister = 0; + range.BaseShaderRegister = 1; range.RegisterSpace = 0; range.OffsetInDescriptorsFromTableStart = 0; ++desc.NumParameters; diff --git a/src/xenia/gpu/hlsl_shader_translator.cc b/src/xenia/gpu/hlsl_shader_translator.cc index 83fd6f02e..205e77bfb 100644 --- a/src/xenia/gpu/hlsl_shader_translator.cc +++ b/src/xenia/gpu/hlsl_shader_translator.cc @@ -228,9 +228,10 @@ std::vector HlslShaderTranslator::CompleteTranslation() { srv_name_suffix = "2d"; break; } - source.AppendFormat( - "Texture%s xe_texture%u_%s : register(t%u, space0);\n", - srv_type_dimension, srv.fetch_constant, srv_name_suffix, i); + // t0 is shared memory in vertex shaders. + source.AppendFormat("Texture%s xe_texture%u_%s : register(t%u);\n", + srv_type_dimension, srv.fetch_constant, srv_name_suffix, + i + (is_vertex_shader() ? 1 : 0)); } for (uint32_t i = 0; i < sampler_count_; ++i) { source.AppendFormat("SamplerState xe_sampler%u : register(s%u);\n", @@ -250,7 +251,7 @@ std::vector HlslShaderTranslator::CompleteTranslation() { // -1 point size means the geometry shader will use the global setting by // default. source.AppendFormat( - "ByteAddressBuffer xe_shared_memory : register(t0, space1);\n" + "ByteAddressBuffer xe_shared_memory : register(t0);\n" "\n" "#define XE_BYTE_SWAP_OVERLOAD(XeByteSwapType) \\\n" "XeByteSwapType XeByteSwap(XeByteSwapType v, uint endian) { \\\n"