mirror of
https://github.com/Inori/GPCS4.git
synced 2024-06-01 19:08:08 -04:00
fix validation errors
This commit is contained in:
parent
a40ba73bb7
commit
6a2ad43265
|
@ -576,12 +576,18 @@ namespace sce::gcn
|
|||
{
|
||||
if (m_controlFlowStack.size() != 0)
|
||||
{
|
||||
uint32_t labelId = m_module.allocateId();
|
||||
// Discard exp instruction in gcn shader
|
||||
// will follow a s_endpgm instruction.
|
||||
// We don't need OpReturn in such case.
|
||||
if (m_blockTerminators.empty())
|
||||
{
|
||||
uint32_t labelId = m_module.allocateId();
|
||||
|
||||
m_module.opReturn();
|
||||
m_module.opLabel(labelId);
|
||||
m_module.opReturn();
|
||||
m_module.opLabel(labelId);
|
||||
|
||||
m_blockTerminators.push_back(labelId);
|
||||
m_blockTerminators.push_back(labelId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1402,7 +1402,7 @@ namespace sce::Gnm
|
|||
|
||||
result.color[slot] = VltAttachment{
|
||||
targetView,
|
||||
VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL
|
||||
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1413,7 +1413,7 @@ namespace sce::Gnm
|
|||
|
||||
result.depth = VltAttachment{
|
||||
depthView,
|
||||
VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL
|
||||
VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#include "GnmShader.h"
|
||||
#include "Violet/VltShader.h"
|
||||
|
||||
#include "Gcn/GcnShaderMeta.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
||||
LOG_CHANNEL(Graphic.Gnm.GnmShader);
|
||||
|
||||
|
@ -11,11 +12,6 @@ using namespace sce::vlt;
|
|||
|
||||
namespace sce::Gnm
|
||||
{
|
||||
//GnmShader::GnmShader() :
|
||||
// m_shader(nullptr)
|
||||
//{
|
||||
//}
|
||||
|
||||
GnmShader::GnmShader(const VltShaderKey& key,
|
||||
const void* code):
|
||||
m_key(key),
|
||||
|
@ -37,6 +33,9 @@ namespace sce::Gnm
|
|||
{
|
||||
m_shader = m_module.compile(meta, moduleInfo);
|
||||
m_shader->setShaderKey(m_key);
|
||||
|
||||
// std::ofstream fout(m_shader->debugName(), std::ofstream::binary);
|
||||
// m_shader->dump(fout);
|
||||
}
|
||||
return m_shader;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ namespace sce::Gnm
|
|||
class GnmShader
|
||||
{
|
||||
public:
|
||||
//GnmShader();
|
||||
GnmShader(const vlt::VltShaderKey& key,
|
||||
const void* code);
|
||||
~GnmShader();
|
||||
|
|
|
@ -491,9 +491,7 @@ namespace sce::vlt
|
|||
}
|
||||
|
||||
if (!m_flags.test(VltContextFlag::GpRenderPassBound))
|
||||
{
|
||||
this->startRenderPass();
|
||||
}
|
||||
|
||||
if (m_flags.test(VltContextFlag::GpDirtyIndexBuffer) && Indexed)
|
||||
this->updateIndexBufferBinding();
|
||||
|
|
|
@ -324,13 +324,16 @@ namespace sce::vlt
|
|||
dsInfo.minDepthBounds = 0.0f;
|
||||
dsInfo.maxDepthBounds = 1.0f;
|
||||
|
||||
// Provide information for dynamic rendering
|
||||
VltGraphicsPipelineDynamicRenderingState rtState(state);
|
||||
|
||||
VkPipelineColorBlendStateCreateInfo cbInfo;
|
||||
cbInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
|
||||
cbInfo.pNext = nullptr;
|
||||
cbInfo.flags = 0;
|
||||
cbInfo.logicOpEnable = state.cb.enableLogicOp();
|
||||
cbInfo.logicOp = state.cb.logicOp();
|
||||
cbInfo.attachmentCount = MaxNumRenderTargets;
|
||||
cbInfo.attachmentCount = rtState.rtInfo.colorAttachmentCount;
|
||||
cbInfo.pAttachments = cbBlendAttachments.data();
|
||||
|
||||
for (uint32_t i = 0; i < 4; i++)
|
||||
|
@ -343,9 +346,6 @@ namespace sce::vlt
|
|||
dyInfo.dynamicStateCount = dynamicStateCount;
|
||||
dyInfo.pDynamicStates = dynamicStates.data();
|
||||
|
||||
// Provide information for dynamic rendering
|
||||
VltGraphicsPipelineDynamicRenderingState rtState(state);
|
||||
|
||||
VkGraphicsPipelineCreateInfo info;
|
||||
info.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
|
||||
info.pNext = &rtState.rtInfo;
|
||||
|
|
Loading…
Reference in a new issue