mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 21:40:20 +01:00
varray.c: fix logic around BGRA with ARB_vertex_type_2_10_10_10_rev.
I introduced a regression in here, I've just split the logic ot now, so its easier to read/understand. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=40664 Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
6edef25a4b
commit
99c1a58b30
1 changed files with 11 additions and 4 deletions
|
|
@ -160,10 +160,17 @@ update_array(struct gl_context *ctx,
|
|||
if (ctx->Extensions.EXT_vertex_array_bgra &&
|
||||
sizeMax == BGRA_OR_4 &&
|
||||
size == GL_BGRA) {
|
||||
if (type != GL_UNSIGNED_BYTE &&
|
||||
(ctx->Extensions.ARB_vertex_type_2_10_10_10_rev &&
|
||||
(type != GL_UNSIGNED_INT_2_10_10_10_REV &&
|
||||
type != GL_INT_2_10_10_10_REV))) {
|
||||
GLboolean bgra_error = GL_FALSE;
|
||||
|
||||
if (ctx->Extensions.ARB_vertex_type_2_10_10_10_rev) {
|
||||
if (type != GL_UNSIGNED_INT_2_10_10_10_REV &&
|
||||
type != GL_INT_2_10_10_10_REV &&
|
||||
type != GL_UNSIGNED_BYTE)
|
||||
bgra_error = GL_TRUE;
|
||||
} else if (type != GL_UNSIGNED_BYTE)
|
||||
bgra_error = GL_TRUE;
|
||||
|
||||
if (bgra_error) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "%s(GL_BGRA/GLubyte)", func);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue