aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/context.c')
-rw-r--r--mesalib/src/mesa/main/context.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index b186a1fad..22c2341d6 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -134,6 +134,7 @@
#include "math/m_matrix.h"
#include "main/dispatch.h" /* for _gloffset_COUNT */
#include "uniforms.h"
+#include "macros.h"
#ifdef USE_SPARC_ASM
#include "sparc/sparc.h"
@@ -446,7 +447,7 @@ _mesa_init_current(struct gl_context *ctx)
GLuint i;
/* Init all to (0,0,0,1) */
- for (i = 0; i < Elements(ctx->Current.Attrib); i++) {
+ for (i = 0; i < ARRAY_SIZE(ctx->Current.Attrib); i++) {
ASSIGN_4V( ctx->Current.Attrib[i], 0.0, 0.0, 0.0, 1.0 );
}
@@ -656,7 +657,7 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
consts->MaxSamples = 0;
/* GLSL default if NativeIntegers == FALSE */
- consts->UniformBooleanTrue = FLT_AS_UINT(1.0f);
+ consts->UniformBooleanTrue = FLOAT_AS_UNION(1.0f).u;
/* GL_ARB_sync */
consts->MaxServerWaitTimeout = 0x1fff7fffffffULL;
@@ -1644,7 +1645,7 @@ _mesa_make_current( struct gl_context *newCtx,
/* We used to call _glapi_check_multithread() here. Now do it in drivers */
_glapi_set_context((void *) newCtx);
- ASSERT(_mesa_get_current_context() == newCtx);
+ assert(_mesa_get_current_context() == newCtx);
if (!newCtx) {
_glapi_set_dispatch(NULL); /* none current */
@@ -1653,8 +1654,8 @@ _mesa_make_current( struct gl_context *newCtx,
_glapi_set_dispatch(newCtx->CurrentDispatch);
if (drawBuffer && readBuffer) {
- ASSERT(_mesa_is_winsys_fbo(drawBuffer));
- ASSERT(_mesa_is_winsys_fbo(readBuffer));
+ assert(_mesa_is_winsys_fbo(drawBuffer));
+ assert(_mesa_is_winsys_fbo(readBuffer));
_mesa_reference_framebuffer(&newCtx->WinSysDrawBuffer, drawBuffer);
_mesa_reference_framebuffer(&newCtx->WinSysReadBuffer, readBuffer);