mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
mesa: set UniformBooleanTrue = 1.0f by default
because NativeIntegers is 0 by default.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82882
Cc: 10.2 10.3 mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit d67db73458)
[emil velikov: s|consts->|ctx->Const.|]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
8e0f72995f
commit
9242770724
2 changed files with 10 additions and 0 deletions
|
|
@ -647,6 +647,9 @@ _mesa_init_constants(struct gl_context *ctx)
|
|||
/* GL_ARB_framebuffer_object */
|
||||
ctx->Const.MaxSamples = 0;
|
||||
|
||||
/* GLSL default if NativeIntegers == FALSE */
|
||||
ctx->Const.UniformBooleanTrue = FLT_AS_UINT(1.0f);
|
||||
|
||||
/* GL_ARB_sync */
|
||||
ctx->Const.MaxServerWaitTimeout = 0x1fff7fffffffULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -184,6 +184,13 @@ static inline GLfloat UINT_AS_FLT(GLuint u)
|
|||
return tmp.f;
|
||||
}
|
||||
|
||||
static inline unsigned FLT_AS_UINT(float f)
|
||||
{
|
||||
fi_type tmp;
|
||||
tmp.f = f;
|
||||
return tmp.u;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a floating point value to an unsigned fixed point value.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue