vulkan: push constants when starting render pass to avoid crash (mali)
This commit is contained in:
parent
78987074a6
commit
c683e0ded8
|
@ -375,6 +375,10 @@ bool Drawer::Draw(const Texture *fogTexture)
|
|||
cmdBuffer.bindVertexBuffers(0, 1, &buffer, zeroOffset);
|
||||
cmdBuffer.bindIndexBuffer(buffer, offsets.indexOffset, vk::IndexType::eUint32);
|
||||
|
||||
// Make sure to push constants even if not used
|
||||
std::array<float, 5> pushConstants = { 0, 0, 0, 0, 0 };
|
||||
cmdBuffer.pushConstants<float>(pipelineManager->GetPipelineLayout(), vk::ShaderStageFlagBits::eFragment, 0, pushConstants);
|
||||
|
||||
RenderPass previous_pass = {};
|
||||
for (int render_pass = 0; render_pass < pvrrc.render_passes.used(); render_pass++)
|
||||
{
|
||||
|
|
|
@ -284,6 +284,10 @@ bool OITDrawer::Draw(const Texture *fogTexture)
|
|||
cmdBuffer.bindVertexBuffers(0, 1, &mainBuffer, zeroOffset);
|
||||
cmdBuffer.bindIndexBuffer(mainBuffer, offsets.indexOffset, vk::IndexType::eUint32);
|
||||
|
||||
// Make sure to push constants even if not used
|
||||
OITDescriptorSets::PushConstants pushConstants = { };
|
||||
cmdBuffer.pushConstants<OITDescriptorSets::PushConstants>(pipelineManager->GetPipelineLayout(), vk::ShaderStageFlagBits::eFragment, 0, pushConstants);
|
||||
|
||||
const std::array<vk::ClearValue, 3> clear_colors = {
|
||||
vk::ClearColorValue(std::array<float, 4>{0.f, 0.f, 0.f, 1.f}),
|
||||
vk::ClearColorValue(std::array<float, 4>{0.f, 0.f, 0.f, 1.f}),
|
||||
|
|
Loading…
Reference in New Issue