Closed danielchasehooper closed 9 months ago
Hmm good point, but unfortunately in that case sokol-gfx cannot differentiate between the bind slot being assigned an invalid handle (SG_INVALID_ID), and the slot not being set in the first place. In both cases there's a zero in .fs.images[SLOT_tex].id
The actual test in the validation layer is bindings->fs.images[i].id != SG_INVALID_ID
(where SG_INVALID_ID
is defined as zero).
Any ideas for a better error message in that case? (e.g. the bind slot is either not set, or the image handle is invalid).
Maybe sg_apply_bindings: image binding is either missing or set to a sg_image with id 0
?
sg_apply_bindings: image binding is either missing or set to an uninitialized sg_image
?
Ok fixed, the new message is:
sg_apply_bindings: image binding on vertex stage is missing or the image handle is invalid
(same format for samplers)
This error message can be confusing when you did assign to the slot, but the
sg_image.id
is zero:sg_apply_bindings: missing image binding on fragment stage
I think it'd be helpful if the message were updated to make it clear that either the bound image is zero or you didn't even specify the binding