mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[dxvk] Do not remap spec constant IDs when compiling shaders
No longer needed since we don't emit per-binding constants anymore.
This commit is contained in:
parent
a637134c56
commit
2e73e46799
@ -93,7 +93,6 @@ namespace dxvk {
|
||||
// Run an analysis pass over the SPIR-V code to gather some
|
||||
// info that we may need during pipeline compilation.
|
||||
std::vector<BindingOffsets> bindingOffsets;
|
||||
std::vector<ConstOffsets> constIdOffsets;
|
||||
std::vector<uint32_t> varIds;
|
||||
|
||||
SpirvCodeBuffer code = std::move(spirv);
|
||||
@ -115,9 +114,6 @@ namespace dxvk {
|
||||
bindingOffsets[varId].setOffset = ins.offset() + 3;
|
||||
}
|
||||
|
||||
if (ins.arg(2) == spv::DecorationSpecId)
|
||||
constIdOffsets.push_back({ ins.arg(3), ins.offset() + 3 });
|
||||
|
||||
if (ins.arg(2) == spv::DecorationLocation && ins.arg(3) == 1) {
|
||||
m_o1LocOffset = ins.offset() + 3;
|
||||
o1VarId = ins.arg(1);
|
||||
@ -152,13 +148,6 @@ namespace dxvk {
|
||||
for (auto varId : varIds) {
|
||||
BindingOffsets info = bindingOffsets[varId];
|
||||
|
||||
for (const auto& specOfs : constIdOffsets) {
|
||||
if (info.bindingId == specOfs.bindingId) {
|
||||
info.constIdOffset = specOfs.constIdOffset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (info.bindingOffset)
|
||||
m_bindingOffsets.push_back(info);
|
||||
}
|
||||
@ -184,9 +173,6 @@ namespace dxvk {
|
||||
if (mappedBinding) {
|
||||
code[info.bindingOffset] = mappedBinding->binding;
|
||||
|
||||
if (info.constIdOffset)
|
||||
code[info.constIdOffset] = mappedBinding->constId;
|
||||
|
||||
if (info.setOffset)
|
||||
code[info.setOffset] = mappedBinding->set;
|
||||
}
|
||||
|
@ -199,14 +199,8 @@ namespace dxvk {
|
||||
|
||||
private:
|
||||
|
||||
struct ConstOffsets {
|
||||
uint32_t bindingId;
|
||||
uint32_t constIdOffset;
|
||||
};
|
||||
|
||||
struct BindingOffsets {
|
||||
uint32_t bindingId;
|
||||
uint32_t constIdOffset;
|
||||
uint32_t bindingOffset;
|
||||
uint32_t setOffset;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user