fix binding id repeat

This commit is contained in:
Asuka 2022-07-15 02:25:20 +08:00
parent ff18254a18
commit 46d45296f2
3 changed files with 12 additions and 16 deletions

View file

@ -2,7 +2,7 @@
#include "GcnCommon.h"
#include "GcnProgramInfo.h"
#include "GcnCompilerDefs.h"
#include "Gnm/GnmConstant.h"
namespace sce::gcn
@ -14,18 +14,15 @@ namespace sce::gcn
enum DxbcBindingProperties : uint32_t
{
GcnConstBufferBindingIndex = 0,
GcnConstBufferBindingCount = Gnm::kSlotCountConstantBuffer +
Gnm::kSlotCountBoolConstant +
Gnm::kSlotCountFloatConstant,
GcnConstBufferBindingCount = GcnMaxSGPR,
GcnSamplerBindingIndex = GcnConstBufferBindingIndex +
GcnConstBufferBindingCount,
GcnSamplerBindingCount = Gnm::kSlotCountSampler,
GcnSamplerBindingCount = GcnMaxSGPR,
GcnResourceBindingIndex = GcnSamplerBindingIndex +
GcnSamplerBindingCount,
GcnResourceBindingCount = Gnm::kSlotCountResource +
Gnm::kSlotCountRwResource,
GcnResourceBindingCount = GcnMaxSGPR,
GcnStageBindingCount = GcnConstBufferBindingCount +
GcnSamplerBindingCount +

View file

@ -25,9 +25,10 @@ namespace sce::Gnm
const void* code);
~GnmShader();
vlt::Rc<vlt::VltShader>
compile(const gcn::GcnModuleInfo& moduleInfo,
const gcn::GcnShaderMeta& meta);
std::string name() const
{
return m_module.name();
}
const gcn::GcnShaderResourceTable&
getResources() const
@ -35,6 +36,10 @@ namespace sce::Gnm
return m_module.getResourceTable();
}
vlt::Rc<vlt::VltShader>
compile(const gcn::GcnModuleInfo& moduleInfo,
const gcn::GcnShaderMeta& meta);
private:
vlt::VltShaderKey m_key;
vlt::Rc<vlt::VltShader> m_shader;

View file

@ -478,15 +478,11 @@ namespace sce::vlt
bool VltContext::commitGraphicsState()
{
if (m_flags.test(VltContextFlag::GpDirtyFramebuffer))
{
this->updateFramebuffer();
}
if (m_flags.test(VltContextFlag::GpDirtyPipeline))
{
if (unlikely(!this->updateGraphicsPipeline()))
return false;
}
if (!m_flags.test(VltContextFlag::GpRenderPassBound))
this->startRenderPass();
@ -503,10 +499,8 @@ namespace sce::vlt
this->updateGraphicsShaderResources();
if (m_flags.test(VltContextFlag::GpDirtyPipelineState))
{
if (unlikely(!this->updateGraphicsPipelineState()))
return false;
}
if (m_flags.any(
VltContextFlag::GpDirtyViewport,