Explorar o código

sokol_gfx.h gl: fix pipeline state cache problem in compute passes with storage attachments

Andre Weissflog hai 4 meses
pai
achega
4bd3433188
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      sokol_gfx.h

+ 5 - 0
sokol_gfx.h

@@ -9773,6 +9773,11 @@ _SOKOL_PRIVATE void _sg_gl_begin_pass(const sg_pass* pass) {
 
     // early out if this a compute pass
     if (pass->compute) {
+        // first pipeline in pass needs to re-apply storage attachments
+        if (_sg.cur_pass.atts && _sg.cur_pass.atts->cmn.has_storage_attachments) {
+            _sg.gl.cache.cur_pipeline = 0;
+            _sg.gl.cache.cur_pipeline_id.id = SG_INVALID_ID;
+        }
         return;
     }