mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 13:54:16 +01:00
[dxvk] Don't return a value from updateShaderResources
We're checking the bind point all the time anyway, so the previous design was inconsistent.
This commit is contained in:
parent
2aa1ff414c
commit
4c0e4fba0c
@ -3853,10 +3853,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
void DxvkContext::updateComputeShaderResources() {
|
void DxvkContext::updateComputeShaderResources() {
|
||||||
if ((m_flags.test(DxvkContextFlag::CpDirtyResources))
|
if ((m_flags.test(DxvkContextFlag::CpDirtyResources))
|
||||||
|| (m_state.cp.pipeline->layout()->hasStaticBufferBindings())) {
|
|| (m_state.cp.pipeline->layout()->hasStaticBufferBindings()))
|
||||||
if (this->updateShaderResources<VK_PIPELINE_BIND_POINT_COMPUTE>(m_state.cp.pipeline->layout()))
|
this->updateShaderResources<VK_PIPELINE_BIND_POINT_COMPUTE>(m_state.cp.pipeline->layout());
|
||||||
m_flags.set(DxvkContextFlag::CpDirtyPipelineState);
|
|
||||||
}
|
|
||||||
|
|
||||||
this->updateShaderDescriptorSetBinding<VK_PIPELINE_BIND_POINT_COMPUTE>(
|
this->updateShaderDescriptorSetBinding<VK_PIPELINE_BIND_POINT_COMPUTE>(
|
||||||
m_cpSet, m_state.cp.pipeline->layout());
|
m_cpSet, m_state.cp.pipeline->layout());
|
||||||
@ -3868,10 +3866,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
void DxvkContext::updateGraphicsShaderResources() {
|
void DxvkContext::updateGraphicsShaderResources() {
|
||||||
if ((m_flags.test(DxvkContextFlag::GpDirtyResources))
|
if ((m_flags.test(DxvkContextFlag::GpDirtyResources))
|
||||||
|| (m_state.gp.pipeline->layout()->hasStaticBufferBindings())) {
|
|| (m_state.gp.pipeline->layout()->hasStaticBufferBindings()))
|
||||||
if (this->updateShaderResources<VK_PIPELINE_BIND_POINT_GRAPHICS>(m_state.gp.pipeline->layout()))
|
this->updateShaderResources<VK_PIPELINE_BIND_POINT_GRAPHICS>(m_state.gp.pipeline->layout());
|
||||||
m_flags.set(DxvkContextFlag::GpDirtyPipelineState);
|
|
||||||
}
|
|
||||||
|
|
||||||
this->updateShaderDescriptorSetBinding<VK_PIPELINE_BIND_POINT_GRAPHICS>(
|
this->updateShaderDescriptorSetBinding<VK_PIPELINE_BIND_POINT_GRAPHICS>(
|
||||||
m_gpSet, m_state.gp.pipeline->layout());
|
m_gpSet, m_state.gp.pipeline->layout());
|
||||||
@ -3882,7 +3878,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
template<VkPipelineBindPoint BindPoint>
|
template<VkPipelineBindPoint BindPoint>
|
||||||
bool DxvkContext::updateShaderResources(const DxvkPipelineLayout* layout) {
|
void DxvkContext::updateShaderResources(const DxvkPipelineLayout* layout) {
|
||||||
std::array<DxvkDescriptorInfo, MaxNumActiveBindings> descriptors;
|
std::array<DxvkDescriptorInfo, MaxNumActiveBindings> descriptors;
|
||||||
|
|
||||||
// Assume that all bindings are active as a fast path
|
// Assume that all bindings are active as a fast path
|
||||||
@ -4060,12 +4056,13 @@ namespace dxvk {
|
|||||||
|
|
||||||
// If some resources are not bound, we may need to
|
// If some resources are not bound, we may need to
|
||||||
// update spec constants and rebind the pipeline
|
// update spec constants and rebind the pipeline
|
||||||
bool updatePipelineState = refMask != bindMask;
|
if (refMask != bindMask) {
|
||||||
|
|
||||||
if (updatePipelineState)
|
|
||||||
refMask = bindMask;
|
refMask = bindMask;
|
||||||
|
|
||||||
return updatePipelineState;
|
m_flags.set(BindPoint == VK_PIPELINE_BIND_POINT_GRAPHICS
|
||||||
|
? DxvkContextFlag::GpDirtyPipelineState
|
||||||
|
: DxvkContextFlag::CpDirtyPipelineState);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1151,7 +1151,7 @@ namespace dxvk {
|
|||||||
void updateGraphicsShaderResources();
|
void updateGraphicsShaderResources();
|
||||||
|
|
||||||
template<VkPipelineBindPoint BindPoint>
|
template<VkPipelineBindPoint BindPoint>
|
||||||
bool updateShaderResources(
|
void updateShaderResources(
|
||||||
const DxvkPipelineLayout* layout);
|
const DxvkPipelineLayout* layout);
|
||||||
|
|
||||||
template<VkPipelineBindPoint BindPoint>
|
template<VkPipelineBindPoint BindPoint>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user