mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 13:45:55 +00:00
Remove magic specialisation constant and push constant set numbers
This commit is contained in:
@@ -439,9 +439,6 @@ struct OpSwitch64
|
||||
|
||||
}; // namespace rdcspv
|
||||
|
||||
static const uint32_t SpecializationConstantBindSet = 1234567;
|
||||
static const uint32_t PushConstantBindSet = 1234568;
|
||||
|
||||
struct SpecConstant
|
||||
{
|
||||
SpecConstant() = default;
|
||||
|
||||
@@ -1083,19 +1083,6 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *api, const ShaderStage s
|
||||
decorations[v.id].binding);
|
||||
}
|
||||
|
||||
uint32_t bindset = 0, bind = 0;
|
||||
if(v.storage == StorageClass::PushConstant)
|
||||
{
|
||||
bindset = PushConstantBindSet;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(decorations[v.id].flags & Decorations::HasDescriptorSet)
|
||||
bindset = decorations[v.id].set;
|
||||
if(decorations[v.id].flags & Decorations::HasBinding)
|
||||
bind = decorations[v.id].binding;
|
||||
}
|
||||
|
||||
SourceVariableMapping sourceVar;
|
||||
sourceVar.name = sourceName;
|
||||
sourceVar.offset = 0;
|
||||
|
||||
@@ -1353,11 +1353,8 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
|
||||
if(ssbo)
|
||||
effectiveStorage = StorageClass::StorageBuffer;
|
||||
|
||||
uint32_t bindset;
|
||||
// set something crazy so this doesn't overlap with a real buffer binding
|
||||
if(pushConst)
|
||||
bindset = PushConstantBindSet;
|
||||
else
|
||||
uint32_t bindset = 0;
|
||||
if(!pushConst)
|
||||
bindset = GetDescSet(decorations[global.id].set);
|
||||
|
||||
uint32_t bind = GetBinding(decorations[global.id].binding);
|
||||
@@ -1646,7 +1643,6 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
|
||||
specblock.inlineDataBytes = true;
|
||||
specblock.compileConstants = true;
|
||||
specblock.byteSize = 0;
|
||||
specblock.fixedBindSetOrSpace = SpecializationConstantBindSet;
|
||||
// set the binding number to some huge value to try to sort it to the end
|
||||
specblock.fixedBindNumber = 0x8000000;
|
||||
specblock.bindArraySize = 1;
|
||||
|
||||
Reference in New Issue
Block a user