mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 20:58:04 +02:00
mesa: add debug code to catch missing _mesa_update_valid_to_render_state calls
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798>
This commit is contained in:
parent
743b912f9d
commit
f0d17aa88c
1 changed files with 10 additions and 0 deletions
|
|
@ -146,6 +146,16 @@ static GLenum
|
|||
valid_prim_mode_custom(struct gl_context *ctx, GLenum mode,
|
||||
GLbitfield valid_prim_mask)
|
||||
{
|
||||
#if DEBUG
|
||||
unsigned mask = ctx->ValidPrimMask;
|
||||
unsigned mask_indexed = ctx->ValidPrimMaskIndexed;
|
||||
bool drawpix_valid = ctx->DrawPixValid;
|
||||
_mesa_update_valid_to_render_state(ctx);
|
||||
assert(mask == ctx->ValidPrimMask &&
|
||||
mask_indexed == ctx->ValidPrimMaskIndexed &&
|
||||
drawpix_valid == ctx->DrawPixValid);
|
||||
#endif
|
||||
|
||||
/* All primitive type enums are less than 32, so we can use the shift. */
|
||||
if (mode >= 32 || !((1u << mode) & valid_prim_mask)) {
|
||||
/* If the primitive type is not in SupportedPrimMask, set GL_INVALID_ENUM,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue