fix(rhi): make opengl descriptor binding set-aware
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "XCEngine/RHI/OpenGL/OpenGLCommandList.h"
|
||||
#include "XCEngine/RHI/OpenGL/OpenGLResourceView.h"
|
||||
#include "XCEngine/RHI/OpenGL/OpenGLPipelineState.h"
|
||||
#include "XCEngine/RHI/OpenGL/OpenGLPipelineLayout.h"
|
||||
#include "XCEngine/RHI/OpenGL/OpenGLShader.h"
|
||||
#include "XCEngine/RHI/OpenGL/OpenGLFramebuffer.h"
|
||||
#include "XCEngine/RHI/OpenGL/OpenGLRenderPass.h"
|
||||
@@ -717,12 +718,13 @@ void OpenGLCommandList::SetGraphicsDescriptorSets(
|
||||
uint32_t count,
|
||||
RHIDescriptorSet** descriptorSets,
|
||||
RHIPipelineLayout* pipelineLayout) {
|
||||
(void)firstSet;
|
||||
(void)pipelineLayout;
|
||||
OpenGLPipelineLayout* openGLPipelineLayout = static_cast<OpenGLPipelineLayout*>(pipelineLayout);
|
||||
|
||||
for (uint32_t i = 0; i < count; ++i) {
|
||||
if (descriptorSets[i] != nullptr) {
|
||||
descriptorSets[i]->Bind();
|
||||
static_cast<OpenGLDescriptorSet*>(descriptorSets[i])->BindWithPipelineLayout(
|
||||
openGLPipelineLayout,
|
||||
firstSet + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -732,12 +734,13 @@ void OpenGLCommandList::SetComputeDescriptorSets(
|
||||
uint32_t count,
|
||||
RHIDescriptorSet** descriptorSets,
|
||||
RHIPipelineLayout* pipelineLayout) {
|
||||
(void)firstSet;
|
||||
(void)pipelineLayout;
|
||||
OpenGLPipelineLayout* openGLPipelineLayout = static_cast<OpenGLPipelineLayout*>(pipelineLayout);
|
||||
|
||||
for (uint32_t i = 0; i < count; ++i) {
|
||||
if (descriptorSets[i] != nullptr) {
|
||||
descriptorSets[i]->Bind();
|
||||
static_cast<OpenGLDescriptorSet*>(descriptorSets[i])->BindWithPipelineLayout(
|
||||
openGLPipelineLayout,
|
||||
firstSet + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user