summaryrefslogtreecommitdiffstats
path: root/src/plugins/renderers/rhi/renderer/pipelineuboset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/renderers/rhi/renderer/pipelineuboset.cpp')
-rw-r--r--src/plugins/renderers/rhi/renderer/pipelineuboset.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/renderers/rhi/renderer/pipelineuboset.cpp b/src/plugins/renderers/rhi/renderer/pipelineuboset.cpp
index 598c32ef9..8cffaac4f 100644
--- a/src/plugins/renderers/rhi/renderer/pipelineuboset.cpp
+++ b/src/plugins/renderers/rhi/renderer/pipelineuboset.cpp
@@ -10,7 +10,7 @@
#include <rhigraphicspipeline_p.h>
#include <rhiresourcemanagers_p.h>
#include <submissioncontext_p.h>
-#include <QtGui/private/qrhi_p.h>
+#include <rhi/qrhi.h>
#include <Qt3DRender/private/nodemanagers_p.h>
#include <Qt3DRender/private/buffermanager_p.h>
#include <Qt3DRender/private/stringtoint_p.h>
@@ -243,7 +243,7 @@ std::vector<QRhiShaderResourceBinding> PipelineUBOSet::resourceBindings(const Re
{
RHITextureManager *textureManager = m_resourceManagers->rhiTextureManager();
RHIShader *shader = command.m_rhiShader;
- const QRhiShaderResourceBinding::StageFlags stages = QRhiShaderResourceBinding::VertexStage|QRhiShaderResourceBinding::FragmentStage;
+ const QRhiShaderResourceBinding::StageFlags stages = QRhiShaderResourceBinding::ComputeStage|QRhiShaderResourceBinding::VertexStage|QRhiShaderResourceBinding::FragmentStage;
std::vector<QRhiShaderResourceBinding> bindings = {
QRhiShaderResourceBinding::uniformBuffer(0, stages, m_rvUBO.buffer->rhiBuffer()),
};
@@ -323,9 +323,10 @@ std::vector<QRhiShaderResourceBinding> PipelineUBOSet::resourceBindings(const Re
for (const BlockToSSBO &ssbo : command.m_parameterPack.shaderStorageBuffers()) {
RHIBuffer *buffer = m_resourceManagers->rhiBufferManager()->lookupResource(ssbo.m_bufferID);
if (buffer) {
+ Q_ASSERT(stages & QRhiShaderResourceBinding::ComputeStage);
bindings.push_back(QRhiShaderResourceBinding::bufferLoadStore(
ssbo.m_bindingIndex,
- stages|QRhiShaderResourceBinding::ComputeStage,
+ stages,
buffer->rhiBuffer()));
}
}
@@ -597,7 +598,7 @@ void PipelineUBOSet::uploadUBOsForCommand(const RenderCommand &command,
uploadUniform(uniforms, ubo,
arrayStructMember,
distanceToCommand,
- i * blockVariable.size / arr0);
+ int(i * blockVariable.size / arr0));
}
}
} else { // Array of scalars