mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-28 18:31:40 +00:00
Remove D3D_Hack_EnableGroups
Now supported by default for D3D11 & D3D12
This commit is contained in:
@@ -41,8 +41,6 @@
|
||||
|
||||
#include "data/hlsl/hlsl_cbuffers.h"
|
||||
|
||||
RDOC_EXTERN_CONFIG(bool, D3D_Hack_EnableGroups);
|
||||
|
||||
class D3D11DebugAPIWrapper : public DXBCDebug::DebugAPIWrapper
|
||||
{
|
||||
public:
|
||||
@@ -2318,9 +2316,8 @@ ShaderDebugTrace *D3D11Replay::DebugThread(uint32_t eventId,
|
||||
uint32_t activeIndex = 0;
|
||||
if(dxbc->GetThreadScope() == DXBC::ThreadScope::Workgroup)
|
||||
{
|
||||
if(D3D_Hack_EnableGroups())
|
||||
activeIndex = threadid[0] + threadid[1] * refl.dispatchThreadsDimension[0] +
|
||||
threadid[2] * refl.dispatchThreadsDimension[0] * refl.dispatchThreadsDimension[1];
|
||||
activeIndex = threadid[0] + threadid[1] * refl.dispatchThreadsDimension[0] +
|
||||
threadid[2] * refl.dispatchThreadsDimension[0] * refl.dispatchThreadsDimension[1];
|
||||
}
|
||||
|
||||
DXBCDebug::InterpretDebugger *interpreter = new DXBCDebug::InterpretDebugger;
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
|
||||
#include "data/hlsl/hlsl_cbuffers.h"
|
||||
|
||||
RDOC_EXTERN_CONFIG(bool, D3D_Hack_EnableGroups);
|
||||
|
||||
using namespace DXBCBytecode;
|
||||
|
||||
static bool IsShaderParameterVisible(DXBC::ShaderType shaderType,
|
||||
@@ -1922,7 +1920,7 @@ ShaderDebugTrace *D3D12Replay::DebugVertex(uint32_t eventId, uint32_t vertid, ui
|
||||
bytebuf staticData[D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT];
|
||||
|
||||
// if we're fetching from the GPU anyway, don't grab any buffer data
|
||||
if(D3D_Hack_EnableGroups() && (dxbc->GetThreadScope() & DXBC::ThreadScope::Subgroup))
|
||||
if(dxbc->GetThreadScope() & DXBC::ThreadScope::Subgroup)
|
||||
vertexbuffers.clear();
|
||||
|
||||
for(auto it = vertexbuffers.begin(); it != vertexbuffers.end(); ++it)
|
||||
@@ -2211,7 +2209,7 @@ ShaderDebugTrace *D3D12Replay::DebugVertex(uint32_t eventId, uint32_t vertid, ui
|
||||
ret->constantBlocks = global.constantBlocks;
|
||||
ret->inputs = state.inputs;
|
||||
}
|
||||
else if(D3D_Hack_EnableGroups() && (dxbc->GetThreadScope() & DXBC::ThreadScope::Subgroup))
|
||||
else if(dxbc->GetThreadScope() & DXBC::ThreadScope::Subgroup)
|
||||
{
|
||||
DXDebug::InputFetcherConfig cfg;
|
||||
DXDebug::InputFetcher fetcher;
|
||||
@@ -2830,7 +2828,7 @@ ShaderDebugTrace *D3D12Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
|
||||
cfg.maxWaveSize = 4;
|
||||
cfg.outputSampleCount = RDCMAX(1U, pipeDesc.SampleDesc.Count);
|
||||
|
||||
if(D3D_Hack_EnableGroups() && (dxbc->GetThreadScope() & DXBC::ThreadScope::Subgroup))
|
||||
if(dxbc->GetThreadScope() & DXBC::ThreadScope::Subgroup)
|
||||
cfg.maxWaveSize = m_pDevice->GetOpts1().WaveLaneCountMax;
|
||||
|
||||
DXDebug::CreateInputFetcher(dxbc, prevDxbc, cfg, fetcher);
|
||||
@@ -3358,10 +3356,8 @@ ShaderDebugTrace *D3D12Replay::DebugThread(uint32_t eventId,
|
||||
uint32_t activeIndex = 0;
|
||||
if(dxbc->GetThreadScope() & DXBC::ThreadScope::Workgroup)
|
||||
{
|
||||
if(D3D_Hack_EnableGroups())
|
||||
activeIndex =
|
||||
threadid[0] + threadid[1] * refl.dispatchThreadsDimension[0] +
|
||||
threadid[2] * refl.dispatchThreadsDimension[0] * refl.dispatchThreadsDimension[1];
|
||||
activeIndex = threadid[0] + threadid[1] * refl.dispatchThreadsDimension[0] +
|
||||
threadid[2] * refl.dispatchThreadsDimension[0] * refl.dispatchThreadsDimension[1];
|
||||
}
|
||||
|
||||
DXBCDebug::InterpretDebugger *interpreter = new DXBCDebug::InterpretDebugger;
|
||||
@@ -3455,7 +3451,7 @@ ShaderDebugTrace *D3D12Replay::DebugThread(uint32_t eventId,
|
||||
rdcarray<DXILDebug::ThreadProperties> workgroupProperties;
|
||||
|
||||
// hard case - with subgroups we want the actual layout so read that from the GPU
|
||||
if(D3D_Hack_EnableGroups() && (dxbc->GetThreadScope() & DXBC::ThreadScope::Subgroup))
|
||||
if(dxbc->GetThreadScope() & DXBC::ThreadScope::Subgroup)
|
||||
{
|
||||
DXDebug::InputFetcherConfig cfg;
|
||||
DXDebug::InputFetcher fetcher;
|
||||
@@ -3705,7 +3701,7 @@ ShaderDebugTrace *D3D12Replay::DebugThread(uint32_t eventId,
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(D3D_Hack_EnableGroups() && (dxbc->GetThreadScope() & DXBC::ThreadScope::Workgroup))
|
||||
else if(dxbc->GetThreadScope() & DXBC::ThreadScope::Workgroup)
|
||||
{
|
||||
numThreads = threadDim[0] * threadDim[1] * threadDim[2];
|
||||
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
#include "dxbc_bytecode.h"
|
||||
#include "dxbc_container.h"
|
||||
|
||||
RDOC_DEBUG_CONFIG(bool, D3D_Hack_EnableGroups, false,
|
||||
"Work in progress allow shaders to be debugged with workgroup requirements.");
|
||||
|
||||
using namespace DXBCBytecode;
|
||||
using namespace DXDebug;
|
||||
|
||||
@@ -4884,8 +4881,7 @@ ShaderDebugTrace *InterpretDebugger::BeginDebug(const DXBC::DXBCContainer *dxbcC
|
||||
if(dxbc->m_Type == DXBC::ShaderType::Compute &&
|
||||
dxbcContainer->GetThreadScope() == DXBC::ThreadScope::Workgroup)
|
||||
{
|
||||
if(D3D_Hack_EnableGroups())
|
||||
workgroupSize = numthreads[0] * numthreads[1] * numthreads[2];
|
||||
workgroupSize = numthreads[0] * numthreads[1] * numthreads[2];
|
||||
}
|
||||
|
||||
for(int i = 0; i < workgroupSize; i++)
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include "dxil_bytecode.h"
|
||||
#include "dxil_common.h"
|
||||
|
||||
RDOC_EXTERN_CONFIG(bool, D3D_Hack_EnableGroups);
|
||||
|
||||
namespace DXIL
|
||||
{
|
||||
enum class ResourcesTag
|
||||
@@ -1870,27 +1868,6 @@ rdcstr Program::GetDebugStatus()
|
||||
"Only supported when debugging pixel shaders dx.op call `%s` %s",
|
||||
callFunc->name.c_str(), ToStr(dxOpCode).c_str());
|
||||
continue;
|
||||
case DXOp::WaveIsFirstLane:
|
||||
case DXOp::WaveGetLaneIndex:
|
||||
case DXOp::WaveGetLaneCount:
|
||||
case DXOp::WaveAnyTrue:
|
||||
case DXOp::WaveAllTrue:
|
||||
case DXOp::WaveActiveAllEqual:
|
||||
case DXOp::WaveActiveBallot:
|
||||
case DXOp::WaveReadLaneAt:
|
||||
case DXOp::WaveReadLaneFirst:
|
||||
case DXOp::WaveActiveOp:
|
||||
case DXOp::WaveActiveBit:
|
||||
case DXOp::WavePrefixOp:
|
||||
case DXOp::WavePrefixBitCount:
|
||||
case DXOp::WaveAllBitCount:
|
||||
case DXOp::WaveMatch:
|
||||
case DXOp::WaveMultiPrefixOp:
|
||||
case DXOp::WaveMultiPrefixBitCount:
|
||||
if(!D3D_Hack_EnableGroups())
|
||||
return StringFormat::Fmt("Unsupported dx.op call `%s` %s", callFunc->name.c_str(),
|
||||
ToStr(dxOpCode).c_str());
|
||||
continue;
|
||||
case DXOp::TempRegLoad:
|
||||
case DXOp::TempRegStore:
|
||||
case DXOp::MinPrecXRegLoad:
|
||||
|
||||
Reference in New Issue
Block a user