1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[dxbc] Emit a spec constant for uniform buffers

This partially reverts commit fd547b666e5324f29eff47f2838832f273bb0fed.

For some reason, not doing so breaks Overwatch (because of course it does).
This commit is contained in:
Philip Rebohle 2019-11-28 00:27:11 +01:00
parent 00a064e32b
commit 49e7df96ec
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -806,6 +806,13 @@ namespace dxvk {
if (asSsbo) if (asSsbo)
m_module.decorate(varId, spv::DecorationNonWritable); m_module.decorate(varId, spv::DecorationNonWritable);
// Declare a specialization constant which will
// store whether or not the resource is bound.
const uint32_t specConstId = m_module.specConstBool(true);
m_module.decorateSpecId(specConstId, bindingId);
m_module.setDebugName(specConstId,
str::format(name, "_bound").c_str());
DxbcConstantBuffer buf; DxbcConstantBuffer buf;
buf.varId = varId; buf.varId = varId;
buf.size = numConstants; buf.size = numConstants;