aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2024-10-17 18:33:34 +0200
committerAndre Weissflog <floooh@gmail.com>2024-10-17 18:33:34 +0200
commit6c0ec0eb53dbc3ad876b7317ee08d754c7905d58 (patch)
tree7ab6060fc2d6ab235aea3f0728de35a1390aad22
parentb26fa319633dacbc69559c95ce4acb99224ff554 (diff)
sokol_gfx.h validation layer: remove a redundant comparison >= 0
-rw-r--r--sokol_gfx.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h
index c58a3bf8..62516977 100644
--- a/sokol_gfx.h
+++ b/sokol_gfx.h
@@ -16667,8 +16667,8 @@ _SOKOL_PRIVATE bool _sg_validate_shader_desc(const sg_shader_desc* desc) {
#if defined(_SOKOL_ANY_GL)
_SG_VALIDATE(img_smp_desc->glsl_name != 0, VALIDATE_SHADERDESC_IMAGE_SAMPLER_PAIR_GLSL_NAME);
#endif
- const bool img_slot_in_range = (img_smp_desc->image_slot >= 0) && (img_smp_desc->image_slot < SG_MAX_IMAGE_BINDSLOTS);
- const bool smp_slot_in_range = (img_smp_desc->sampler_slot >= 0) && (img_smp_desc->sampler_slot < SG_MAX_SAMPLER_BINDSLOTS);
+ const bool img_slot_in_range = img_smp_desc->image_slot < SG_MAX_IMAGE_BINDSLOTS;
+ const bool smp_slot_in_range = img_smp_desc->sampler_slot < SG_MAX_SAMPLER_BINDSLOTS;
_SG_VALIDATE(img_slot_in_range, VALIDATE_SHADERDESC_IMAGE_SAMPLER_PAIR_IMAGE_SLOT_OUT_OF_RANGE);
_SG_VALIDATE(smp_slot_in_range, VALIDATE_SHADERDESC_IMAGE_SAMPLER_PAIR_SAMPLER_SLOT_OUT_OF_RANGE);
if (img_slot_in_range && smp_slot_in_range) {