RHI: Add Compute Pipeline abstraction with D3D12 and OpenGL support

- Add SetComputeShader/GetComputeShader/HasComputeShader to RHIPipelineState
- Add m_computePipelineState for D3D12 compute PSO
- Add m_computeProgram/m_computeShader for OpenGL
- Fix OpenGLCommandList::DispatchCompute bug (was ignoring x,y,z params)
- Fix OpenGLShader::GetID usage in OpenGLPipelineState
- Mark Priority 8 as completed in RHI_Design_Issues.md
This commit is contained in:
2026-03-25 01:05:03 +08:00
parent da48b808cd
commit 6328ac8d37
8 changed files with 72 additions and 10 deletions

View File

@@ -271,11 +271,8 @@ void OpenGLCommandList::DispatchIndirect(unsigned int buffer, size_t offset) {
glBindBuffer(GL_DISPATCH_INDIRECT_BUFFER, 0);
}
void OpenGLCommandList::DispatchCompute(unsigned int x, unsigned int y, unsigned int z, unsigned int groupX, unsigned int groupY, unsigned int groupZ) {
glDispatchCompute(groupX, groupY, groupZ);
(void)x;
(void)y;
(void)z;
void OpenGLCommandList::DispatchCompute(unsigned int x, unsigned int y, unsigned int z) {
glDispatchCompute(x, y, z);
}
void OpenGLCommandList::MemoryBarrier(unsigned int barriers) {