aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2025-05-05 13:57:55 +0200
committerAndre Weissflog <floooh@gmail.com>2025-05-05 13:57:55 +0200
commitde819d5fff3fb6cddd1faf7e7fec4544347cfddc (patch)
tree548ed0992a09a48fe0d3871009c3ed93dda2b971
parent4bd3433188b6ee0549cb522d20d2efa32e9cd2c1 (diff)
sokol_gfx.h gl: minor code cleanup
-rw-r--r--sokol_gfx.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h
index c1fcb549..42c26058 100644
--- a/sokol_gfx.h
+++ b/sokol_gfx.h
@@ -10186,9 +10186,10 @@ _SOKOL_PRIVATE void _sg_gl_apply_compute_pipeline_state(_sg_pipeline_t* pip) {
const _sg_attachments_t* atts = _sg.cur_pass.atts;
const _sg_shader_t* shd = pip->shader;
for (size_t i = 0; i < SG_MAX_STORAGE_ATTACHMENTS; i++) {
- if (shd->cmn.storage_images[i].stage != SG_SHADERSTAGE_COMPUTE) {
+ if (shd->cmn.storage_images[i].stage == SG_SHADERSTAGE_NONE) {
continue;
}
+ SOKOL_ASSERT(shd->cmn.storage_images[i].stage == SG_SHADERSTAGE_COMPUTE);
SOKOL_ASSERT(shd->gl.simg_binding[i] < _SG_GL_MAX_SIMG_BINDINGS);
SOKOL_ASSERT(atts->gl.storages[i].image);
_sg_image_t* img = atts->gl.storages[i].image;