Fix sampling program source for ld_ms sampling

This commit is contained in:
baldurk committed 2020-02-06 17:58:42 +00:00
1 parent c2e180ea28
commit 9436dbf8c3
2 files changed
+8 -2

No files matched your search

+7 -1
View File
@@ -1320,7 +1320,7 @@ bool D3D11DebugAPIWrapper::CalculateSampleGather(
{
sampleProgram = StringFormat::Fmt("%s : register(t0);\n\n", textureDecl.c_str());
sampleProgram += funcRet + " main() : SV_Target0\n{\n";
sampleProgram += StringFormat::Fmt("t.Load(%s, int(%d) %s)%s;\n", texcoords.c_str(),
sampleProgram += StringFormat::Fmt("return t.Load(%s, int(%d) %s)%s;\n", texcoords.c_str(),
multisampleIndex, offsets.c_str(), strSwizzle.c_str());
sampleProgram += "\n}\n";
}
@@ -1349,6 +1349,12 @@ bool D3D11DebugAPIWrapper::CalculateSampleGather(
ID3D11PixelShader *ps =
m_pDevice->GetShaderCache()->MakePShader(sampleProgram.c_str(), "main", "ps_5_0");
if(!vs || !ps)
{
RDCERR("Sample VS or PS failed to compile");
return false;
}
ID3D11DeviceContext *context = NULL;
m_pDevice->GetImmediateContext(&context);
+1 -1
View File
@@ -879,7 +879,7 @@ bool D3D12DebugAPIWrapper::CalculateSampleGather(
sampleProgram =
StringFormat::Fmt("%s : register(%s);\n\n", textureDecl.c_str(), strResourceBinding.c_str());
sampleProgram += funcRet + " main() : SV_Target0\n{\n";
sampleProgram += StringFormat::Fmt("t.Load(%s, int(%d) %s)%s;\n", texcoords.c_str(),
sampleProgram += StringFormat::Fmt("return t.Load(%s, int(%d) %s)%s;\n", texcoords.c_str(),
multisampleIndex, offsets.c_str(), strSwizzle.c_str());
sampleProgram += "\n}\n";
}