mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-27 08:56:44 +00:00
Rename DXBCDXILDebug shader debugging helpers to DXDebug
This commit is contained in:
@@ -565,9 +565,9 @@ D3D12Descriptor D3D12ShaderDebug::FindDescriptor(WrappedID3D12Device *device,
|
||||
|
||||
ShaderVariable D3D12ShaderDebug::GetResourceInfo(WrappedID3D12Device *device,
|
||||
D3D12_DESCRIPTOR_RANGE_TYPE descType,
|
||||
const DXBCDXILDebug::BindingSlot &slot,
|
||||
uint32_t mipLevel, const DXBC::ShaderType shaderType,
|
||||
int &dim, bool isDXIL)
|
||||
const DXDebug::BindingSlot &slot, uint32_t mipLevel,
|
||||
const DXBC::ShaderType shaderType, int &dim,
|
||||
bool isDXIL)
|
||||
{
|
||||
ShaderVariable result("", 0U, 0U, 0U, 0U);
|
||||
|
||||
@@ -845,7 +845,7 @@ ShaderVariable D3D12ShaderDebug::GetResourceInfo(WrappedID3D12Device *device,
|
||||
|
||||
ShaderVariable D3D12ShaderDebug::GetSampleInfo(WrappedID3D12Device *device,
|
||||
D3D12_DESCRIPTOR_RANGE_TYPE descType,
|
||||
const DXBCDXILDebug::BindingSlot &slot,
|
||||
const DXDebug::BindingSlot &slot,
|
||||
const DXBC::ShaderType shaderType,
|
||||
const char *opString)
|
||||
{
|
||||
@@ -933,13 +933,13 @@ public:
|
||||
uint32_t mipLevel, int &dim);
|
||||
|
||||
bool CalculateSampleGather(DXBCBytecode::OpcodeType opcode,
|
||||
DXBCDXILDebug::SampleGatherResourceData resourceData,
|
||||
DXBCDXILDebug::SampleGatherSamplerData samplerData,
|
||||
const ShaderVariable &uv, const ShaderVariable &ddxCalc,
|
||||
const ShaderVariable &ddyCalc, const int8_t texelOffsets[3],
|
||||
int multisampleIndex, float lodOrCompareValue,
|
||||
const uint8_t swizzle[4], DXBCDXILDebug::GatherChannel gatherChannel,
|
||||
const char *opString, ShaderVariable &output);
|
||||
DXDebug::SampleGatherResourceData resourceData,
|
||||
DXDebug::SampleGatherSamplerData samplerData, const ShaderVariable &uv,
|
||||
const ShaderVariable &ddxCalc, const ShaderVariable &ddyCalc,
|
||||
const int8_t texelOffsets[3], int multisampleIndex,
|
||||
float lodOrCompareValue, const uint8_t swizzle[4],
|
||||
DXDebug::GatherChannel gatherChannel, const char *opString,
|
||||
ShaderVariable &output);
|
||||
|
||||
private:
|
||||
DXBC::ShaderType GetShaderType() { return m_dxbc ? m_dxbc->m_Type : DXBC::ShaderType::Pixel; }
|
||||
@@ -1424,11 +1424,11 @@ ShaderVariable D3D12DebugAPIWrapper::GetResourceInfo(DXBCBytecode::OperandType t
|
||||
}
|
||||
|
||||
bool D3D12DebugAPIWrapper::CalculateSampleGather(
|
||||
DXBCBytecode::OpcodeType opcode, DXBCDXILDebug::SampleGatherResourceData resourceData,
|
||||
DXBCDXILDebug::SampleGatherSamplerData samplerData, const ShaderVariable &uv,
|
||||
DXBCBytecode::OpcodeType opcode, DXDebug::SampleGatherResourceData resourceData,
|
||||
DXDebug::SampleGatherSamplerData samplerData, const ShaderVariable &uv,
|
||||
const ShaderVariable &ddxCalc, const ShaderVariable &ddyCalc, const int8_t texelOffsets[3],
|
||||
int multisampleIndex, float lodOrCompareValue, const uint8_t swizzle[4],
|
||||
DXBCDXILDebug::GatherChannel gatherChannel, const char *opString, ShaderVariable &output)
|
||||
DXDebug::GatherChannel gatherChannel, const char *opString, ShaderVariable &output)
|
||||
{
|
||||
using namespace DXBCBytecode;
|
||||
|
||||
|
||||
@@ -24,18 +24,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "driver/shaders/dxbc/dx_debug.h"
|
||||
#include "driver/shaders/dxbc/dxbc_common.h"
|
||||
#include "driver/shaders/dxbc/dxbcdxil_debug.h"
|
||||
#include "d3d12_manager.h"
|
||||
|
||||
namespace D3D12ShaderDebug
|
||||
{
|
||||
using namespace DXBCDXILDebug;
|
||||
using namespace DXDebug;
|
||||
|
||||
typedef DXBCDXILDebug::SampleGatherResourceData SampleGatherResourceData;
|
||||
typedef DXBCDXILDebug::SampleGatherSamplerData SampleGatherSamplerData;
|
||||
typedef DXBCDXILDebug::BindingSlot BindingSlot;
|
||||
typedef DXBCDXILDebug::GatherChannel GatherChannel;
|
||||
typedef DXDebug::SampleGatherResourceData SampleGatherResourceData;
|
||||
typedef DXDebug::SampleGatherSamplerData SampleGatherSamplerData;
|
||||
typedef DXDebug::BindingSlot BindingSlot;
|
||||
typedef DXDebug::GatherChannel GatherChannel;
|
||||
typedef DXBCBytecode::SamplerMode SamplerMode;
|
||||
|
||||
// Helpers used by DXBC and DXIL debuggers to interact with GPU and resources
|
||||
@@ -52,16 +52,15 @@ bool CalculateSampleGather(bool dxil, WrappedID3D12Device *device, int sampleOp,
|
||||
uint32_t instruction, const char *opString, ShaderVariable &output);
|
||||
|
||||
D3D12Descriptor FindDescriptor(WrappedID3D12Device *device, D3D12_DESCRIPTOR_RANGE_TYPE descType,
|
||||
const DXBCDXILDebug::BindingSlot &slot,
|
||||
const DXBC::ShaderType shaderType);
|
||||
const DXDebug::BindingSlot &slot, const DXBC::ShaderType shaderType);
|
||||
|
||||
ShaderVariable GetResourceInfo(WrappedID3D12Device *device, D3D12_DESCRIPTOR_RANGE_TYPE descType,
|
||||
const DXBCDXILDebug::BindingSlot &slot, uint32_t mipLevel,
|
||||
const DXDebug::BindingSlot &slot, uint32_t mipLevel,
|
||||
const DXBC::ShaderType shaderType, int &dim, bool isDXIL);
|
||||
|
||||
ShaderVariable GetSampleInfo(WrappedID3D12Device *device, D3D12_DESCRIPTOR_RANGE_TYPE descType,
|
||||
const DXBCDXILDebug::BindingSlot &slot,
|
||||
const DXBC::ShaderType shaderType, const char *opString);
|
||||
const DXDebug::BindingSlot &slot, const DXBC::ShaderType shaderType,
|
||||
const char *opString);
|
||||
|
||||
ShaderVariable GetRenderTargetSampleInfo(WrappedID3D12Device *device,
|
||||
const DXBC::ShaderType shaderType, const char *opString);
|
||||
|
||||
+5
-5
@@ -22,9 +22,9 @@
|
||||
* THE SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include "dxbcdxil_debug.h"
|
||||
#include "dx_debug.h"
|
||||
|
||||
namespace DXBCDXILDebug
|
||||
namespace DXDebug
|
||||
{
|
||||
// "NaN has special handling. If one source operand is NaN, then the other source operand is
|
||||
// returned. If both are NaN, any NaN representation is returned."
|
||||
@@ -187,16 +187,16 @@ void get_sample_position(uint32_t sampleIndex, uint32_t sampleCount, float *posi
|
||||
#undef _SMP
|
||||
}
|
||||
|
||||
}; // namespace DXBCDXILDebug
|
||||
}; // namespace DXDebug
|
||||
|
||||
#if ENABLED(ENABLE_UNIT_TESTS)
|
||||
|
||||
#include <limits>
|
||||
#include "catch/catch.hpp"
|
||||
|
||||
using namespace DXBCDXILDebug;
|
||||
using namespace DXDebug;
|
||||
|
||||
TEST_CASE("DXBCDXIL debugging helpers", "[program]")
|
||||
TEST_CASE("DXBC DXIL shader debugging helpers", "[program]")
|
||||
{
|
||||
const float posinf = std::numeric_limits<float>::infinity();
|
||||
const float neginf = -std::numeric_limits<float>::infinity();
|
||||
+1
-1
@@ -35,7 +35,7 @@ enum ResourceDimension;
|
||||
enum SamplerMode;
|
||||
};
|
||||
|
||||
namespace DXBCDXILDebug
|
||||
namespace DXDebug
|
||||
{
|
||||
typedef DXBC::ResourceRetType ResourceRetType;
|
||||
typedef DXBCBytecode::ResourceDimension ResourceDimension;
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "api/replay/rdcpair.h"
|
||||
#include "api/replay/rdcstr.h"
|
||||
#include "api/replay/shader_types.h"
|
||||
#include "dxbcdxil_debug.h"
|
||||
#include "dx_debug.h"
|
||||
|
||||
struct DXBCContainerDebugger : public ShaderDebugger
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "dxbc_container.h"
|
||||
|
||||
using namespace DXBCBytecode;
|
||||
using namespace DXBCDXILDebug;
|
||||
using namespace DXDebug;
|
||||
|
||||
namespace DXBCDebug
|
||||
{
|
||||
@@ -3529,7 +3529,7 @@ void ThreadState::StepNext(ShaderDebugState *state, DebugAPIWrapper *apiWrapper,
|
||||
"Shader debugging %d: %s\nNon-multisampled texture being passed to sample_pos",
|
||||
nextInstruction - 1, op.str.c_str()));
|
||||
}
|
||||
DXBCDXILDebug::get_sample_position(sampleIndex, sampleCount, result.value.f32v.data());
|
||||
DXDebug::get_sample_position(sampleIndex, sampleCount, result.value.f32v.data());
|
||||
}
|
||||
|
||||
// apply swizzle
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/common.h"
|
||||
#include "dx_debug.h"
|
||||
#include "dxbc_bytecode.h"
|
||||
#include "dxbcdxil_debug.h"
|
||||
|
||||
namespace DXBC
|
||||
{
|
||||
@@ -48,12 +48,12 @@ enum DXGI_FORMAT;
|
||||
|
||||
namespace DXBCDebug
|
||||
{
|
||||
using namespace DXBCDXILDebug;
|
||||
using namespace DXDebug;
|
||||
|
||||
typedef DXBCDXILDebug::SampleGatherResourceData SampleGatherResourceData;
|
||||
typedef DXBCDXILDebug::SampleGatherSamplerData SampleGatherSamplerData;
|
||||
typedef DXBCDXILDebug::BindingSlot BindingSlot;
|
||||
typedef DXBCDXILDebug::GatherChannel GatherChannel;
|
||||
typedef DXDebug::SampleGatherResourceData SampleGatherResourceData;
|
||||
typedef DXDebug::SampleGatherSamplerData SampleGatherSamplerData;
|
||||
typedef DXDebug::BindingSlot BindingSlot;
|
||||
typedef DXDebug::GatherChannel GatherChannel;
|
||||
|
||||
BindingSlot GetBindingSlotForDeclaration(const DXBCBytecode::Program &program,
|
||||
const DXBCBytecode::Declaration &decl);
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dxbcdxil_debug.cpp" />
|
||||
<ClCompile Include="dx_debug.cpp" />
|
||||
<ClCompile Include="dxbc_bytecode.cpp" />
|
||||
<ClCompile Include="dxbc_bytecode_editor.cpp" />
|
||||
<ClCompile Include="dxbc_bytecode_vendorext.cpp" />
|
||||
@@ -118,7 +118,7 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="dxbcdxil_debug.h" />
|
||||
<ClInclude Include="dx_debug.h" />
|
||||
<ClInclude Include="dxbc_bytecode.h" />
|
||||
<ClInclude Include="dxbc_bytecode_editor.h" />
|
||||
<ClInclude Include="dxbc_bytecode_ops.h" />
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<ClCompile Include="dxbc_stringise.cpp" />
|
||||
<ClCompile Include="dxbc_bytecode_vendorext.cpp" />
|
||||
<ClCompile Include="dxbc_bytecode_editor.cpp" />
|
||||
<ClCompile Include="dxbcdxil_debug.cpp" />
|
||||
<ClCompile Include="dx_debug.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="dxbc_debug.h" />
|
||||
@@ -37,7 +37,7 @@
|
||||
<ClInclude Include="dxbc_bytecode.h" />
|
||||
<ClInclude Include="dxbc_bytecode_ops.h" />
|
||||
<ClInclude Include="dxbc_bytecode_editor.h" />
|
||||
<ClInclude Include="dxbcdxil_debug.h" />
|
||||
<ClInclude Include="dx_debug.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="PCH">
|
||||
|
||||
Reference in New Issue
Block a user