mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-25 16:20:36 +00:00
Fix sampling program source for ld_ms sampling
This commit is contained in:
2 files changed
+8
-2
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user