aboutsummaryrefslogtreecommitdiff
path: root/sokol_gfx.h
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2025-12-13 16:19:42 +0100
committerAndre Weissflog <floooh@gmail.com>2025-12-13 16:19:42 +0100
commitb95c5245ba357967220c9a860c7578a7487937b0 (patch)
tree528b64edaf596f0d04c25d10410d3e0b3e50f07a /sokol_gfx.h
parent5d11344150973f15e16d3ec4ee7550a73fb995e0 (diff)
sokol_gfx.h: add assert in _sg_validate_pipeline_desc (fixes #1404)
Diffstat (limited to 'sokol_gfx.h')
-rw-r--r--sokol_gfx.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h
index bf811b79..d6fd1c45 100644
--- a/sokol_gfx.h
+++ b/sokol_gfx.h
@@ -22893,6 +22893,7 @@ _SOKOL_PRIVATE bool _sg_validate_pipeline_desc(const sg_pipeline_desc* desc) {
}
}
for (size_t color_index = 0; color_index < (size_t)desc->color_count; color_index++) {
+ SOKOL_ASSERT(color_index < SG_MAX_COLOR_ATTACHMENTS);
const sg_blend_state* bs = &desc->colors[color_index].blend;
if ((bs->op_rgb == SG_BLENDOP_MIN) || (bs->op_rgb == SG_BLENDOP_MAX)) {
_SG_VALIDATE((bs->src_factor_rgb == SG_BLENDFACTOR_ONE) && (bs->dst_factor_rgb == SG_BLENDFACTOR_ONE), VALIDATE_PIPELINEDESC_BLENDOP_MINMAX_REQUIRES_BLENDFACTOR_ONE);