mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Work around NV driver bug miscompiling quadSwizzleHelper() in some cases
This commit is contained in:
@@ -1863,6 +1863,7 @@ ShaderDebugTrace *D3D11Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
|
||||
|
||||
cfg.x = x;
|
||||
cfg.y = y;
|
||||
cfg.waveOps = false;
|
||||
cfg.maxWaveSize = 4;
|
||||
|
||||
ID3D11DepthStencilView *depthView = NULL;
|
||||
|
||||
@@ -2235,6 +2235,7 @@ ShaderDebugTrace *D3D12Replay::DebugVertex(uint32_t eventId, uint32_t vertid, ui
|
||||
cfg.vert = sv_vertid;
|
||||
cfg.inst = instid;
|
||||
cfg.uavslot = 1;
|
||||
cfg.waveOps = m_pDevice->GetOpts1().WaveOps != FALSE;
|
||||
cfg.maxWaveSize = m_pDevice->GetOpts1().WaveLaneCountMax;
|
||||
|
||||
DXDebug::CreateInputFetcher(dxbc, NULL, cfg, fetcher);
|
||||
@@ -2821,6 +2822,7 @@ ShaderDebugTrace *D3D12Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
|
||||
cfg.x = x;
|
||||
cfg.y = y;
|
||||
cfg.uavslot = 1;
|
||||
cfg.waveOps = m_pDevice->GetOpts1().WaveOps != FALSE;
|
||||
cfg.maxWaveSize = 4;
|
||||
cfg.outputSampleCount = RDCMAX(1U, pipeDesc.SampleDesc.Count);
|
||||
|
||||
@@ -3474,6 +3476,7 @@ ShaderDebugTrace *D3D12Replay::DebugThread(uint32_t eventId,
|
||||
groupid[2] * threadDim[2] + threadid[2],
|
||||
};
|
||||
cfg.uavslot = 1;
|
||||
cfg.waveOps = m_pDevice->GetOpts1().WaveOps != FALSE;
|
||||
cfg.maxWaveSize = m_pDevice->GetOpts1().WaveLaneCountMax;
|
||||
|
||||
DXDebug::CreateInputFetcher(dxbc, NULL, cfg, fetcher);
|
||||
|
||||
@@ -378,7 +378,15 @@ void CreateLegacyInputFetcher(const DXBC::DXBCContainer *dxbc, const InputFetche
|
||||
(sizeof(DXDebug::PSLaneData) + fetcher.laneDataBufferStride) * cfg.maxWaveSize;
|
||||
fetcher.laneDataBufferStride = 0;
|
||||
|
||||
fetcher.hlsl += GetEmbeddedResource(quadswizzle_hlsl);
|
||||
bool dxil = dxbc->GetDXILByteCode() != NULL;
|
||||
|
||||
// work around NV driver bug - it miscompiles the quad swizzle helper sometimes, so use the wave op instead
|
||||
if(!dxil || !cfg.waveOps)
|
||||
fetcher.hlsl += GetEmbeddedResource(quadswizzle_hlsl);
|
||||
else
|
||||
fetcher.hlsl +=
|
||||
"#define quadSwizzleHelper(value, quadLaneIndex, readIndex) "
|
||||
"QuadReadLaneAt(value, readIndex)\n";
|
||||
|
||||
fetcher.hlsl += R"(
|
||||
struct LaneData
|
||||
|
||||
@@ -182,6 +182,7 @@ struct InputFetcherConfig
|
||||
uint32_t uavslot = 0;
|
||||
uint32_t uavspace = 0;
|
||||
uint32_t maxWaveSize = 64;
|
||||
bool waveOps = false;
|
||||
uint32_t outputSampleCount = 1;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user