mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-30 02:52:10 +01:00
[dxbc] Remove push constant block for now
This needs some more work.
This commit is contained in:
parent
a567f6a5a5
commit
201cb88d27
@ -4482,8 +4482,6 @@ namespace dxvk {
|
||||
m_module.enableCapability(spv::CapabilityShader);
|
||||
m_module.enableCapability(spv::CapabilityImageQuery);
|
||||
|
||||
m_pushConstantBlock = getPushConstantBlockId();
|
||||
|
||||
// Initialize the shader module with capabilities
|
||||
// etc. Each shader type has its own peculiarities.
|
||||
switch (m_version.type()) {
|
||||
@ -4921,32 +4919,4 @@ namespace dxvk {
|
||||
return typeId;
|
||||
}
|
||||
|
||||
|
||||
uint32_t DxbcCompiler::getPushConstantBlockId() {
|
||||
uint32_t t_u32 = m_module.defIntType(32, 0);
|
||||
|
||||
std::array<uint32_t, 1> members;
|
||||
members[PushConstant_InstanceId] = t_u32;
|
||||
|
||||
uint32_t typeId = m_module.defStructTypeUnique(
|
||||
members.size(), members.data());
|
||||
|
||||
m_module.memberDecorateOffset(typeId, 0, 0);
|
||||
m_module.decorateBlock(typeId);
|
||||
|
||||
m_module.setDebugName(typeId, "s_push_constant");
|
||||
m_module.setDebugMemberName(typeId, PerVertex_Position, "instance_id");
|
||||
|
||||
// There's only ever going to be one single push constant
|
||||
// block per shader, so we'll declare the variable here
|
||||
uint32_t ptrTypeId = m_module.defPointerType(
|
||||
typeId, spv::StorageClassPushConstant);
|
||||
|
||||
uint32_t varId = m_module.newVar(
|
||||
ptrTypeId, spv::StorageClassPushConstant);
|
||||
|
||||
m_module.setDebugName(varId, "push_constant");
|
||||
return varId;
|
||||
}
|
||||
|
||||
}
|
@ -572,16 +572,9 @@ namespace dxvk {
|
||||
this->commitGraphicsState();
|
||||
|
||||
if (m_gpActivePipeline != VK_NULL_HANDLE) {
|
||||
if (!m_flags.test(DxvkContextFlag::GpEmulateInstanceFetchRate)) {
|
||||
m_cmd->cmdDraw(
|
||||
vertexCount, instanceCount,
|
||||
firstVertex, firstInstance);
|
||||
} else {
|
||||
static bool errorShown = false;
|
||||
|
||||
if (!std::exchange(errorShown, true))
|
||||
Logger::warn("Dxvk: GpEmulateInstanceFetchRate not supported for direct draws");
|
||||
}
|
||||
m_cmd->cmdDraw(
|
||||
vertexCount, instanceCount,
|
||||
firstVertex, firstInstance);
|
||||
}
|
||||
}
|
||||
|
||||
@ -595,17 +588,10 @@ namespace dxvk {
|
||||
if (m_gpActivePipeline != VK_NULL_HANDLE) {
|
||||
auto physicalSlice = buffer.physicalSlice();
|
||||
|
||||
if (!m_flags.test(DxvkContextFlag::GpEmulateInstanceFetchRate)) {
|
||||
m_cmd->cmdDrawIndirect(
|
||||
physicalSlice.handle(),
|
||||
physicalSlice.offset(),
|
||||
count, stride);
|
||||
} else {
|
||||
static bool errorShown = false;
|
||||
|
||||
if (!std::exchange(errorShown, true))
|
||||
Logger::warn("Dxvk: GpEmulateInstanceFetchRate not supported for indirect draws");
|
||||
}
|
||||
m_cmd->cmdDrawIndirect(
|
||||
physicalSlice.handle(),
|
||||
physicalSlice.offset(),
|
||||
count, stride);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1083,6 +1069,13 @@ namespace dxvk {
|
||||
|
||||
m_state.gp.state.ilAttributeCount = attributeCount;
|
||||
m_state.gp.state.ilBindingCount = bindingCount;
|
||||
|
||||
if (m_flags.test(DxvkContextFlag::GpEmulateInstanceFetchRate)) {
|
||||
static bool errorShown = false;
|
||||
|
||||
if (!std::exchange(errorShown, true))
|
||||
Logger::warn("Dxvk: GpEmulateInstanceFetchRate not handled yet");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user