diff options
Diffstat (limited to 'mesalib/src')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_cpu_detect.c | 5 | ||||
-rw-r--r-- | mesalib/src/glsl/builtin_functions.cpp | 4 | ||||
-rw-r--r-- | mesalib/src/mesa/main/errors.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/main/syncobj.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/program/prog_statevars.c | 3 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_manager.c | 2 |
6 files changed, 12 insertions, 6 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c index 2ff40bb00..d2d1313f8 100644 --- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c +++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c @@ -283,8 +283,11 @@ static INLINE boolean sse2_has_daz(void) fxarea.mxcsr_mask = 0; #if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) __asm __volatile ("fxsave %0" : "+m" (fxarea)); -#elif (defined(PIPE_CC_MSVC) || defined(PIPE_CC_ICL)) +#elif (defined(PIPE_CC_MSVC) && _MSC_VER >= 1700) || defined(PIPE_CC_ICL) + /* 1700 = Visual Studio 2012 */ _fxsave(&fxarea); +#else + fxarea.mxcsr_mask = 0; #endif return !!(fxarea.mxcsr_mask & (1 << 6)); } diff --git a/mesalib/src/glsl/builtin_functions.cpp b/mesalib/src/glsl/builtin_functions.cpp index 5d8f171b9..ce78df12e 100644 --- a/mesalib/src/glsl/builtin_functions.cpp +++ b/mesalib/src/glsl/builtin_functions.cpp @@ -525,6 +525,9 @@ private: * @{ */ builtin_builder::builtin_builder() + : shader(NULL), + gl_ModelViewProjectionMatrix(NULL), + gl_Vertex(NULL) { mem_ctx = NULL; } @@ -1850,6 +1853,7 @@ builtin_builder::add_function(const char *name, ...) f->add_signature(sig); } + va_end(ap); shader->symbols->add_function(f); } diff --git a/mesalib/src/mesa/main/errors.c b/mesalib/src/mesa/main/errors.c index e1a9fe2f5..28357e0e8 100644 --- a/mesalib/src/mesa/main/errors.c +++ b/mesalib/src/mesa/main/errors.c @@ -856,7 +856,7 @@ _mesa_PushDebugGroup(GLenum source, GLuint id, GLsizei length, length = strlen(message); emptySlot = &ctx->Debug.DebugGroupMsgs[ctx->Debug.GroupStackDepth]; store_message_details(emptySlot, gl_enum_to_debug_source(source), - gl_enum_to_debug_source(GL_DEBUG_TYPE_PUSH_GROUP), + gl_enum_to_debug_type(GL_DEBUG_TYPE_PUSH_GROUP), id, gl_enum_to_debug_severity(GL_DEBUG_SEVERITY_NOTIFICATION), length, message); diff --git a/mesalib/src/mesa/main/syncobj.c b/mesalib/src/mesa/main/syncobj.c index f9736938a..3157491bf 100644 --- a/mesalib/src/mesa/main/syncobj.c +++ b/mesalib/src/mesa/main/syncobj.c @@ -71,7 +71,7 @@ static struct gl_sync_object * _mesa_new_sync_object(struct gl_context *ctx, GLenum type) { - struct gl_sync_object *s = MALLOC_STRUCT(gl_sync_object); + struct gl_sync_object *s = CALLOC_STRUCT(gl_sync_object); (void) ctx; (void) type; diff --git a/mesalib/src/mesa/program/prog_statevars.c b/mesalib/src/mesa/program/prog_statevars.c index f6073be13..145c07c67 100644 --- a/mesalib/src/mesa/program/prog_statevars.c +++ b/mesalib/src/mesa/program/prog_statevars.c @@ -256,8 +256,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[], value[0] = ctx->Fog.Density; value[1] = ctx->Fog.Start; value[2] = ctx->Fog.End; - value[3] = (ctx->Fog.End == ctx->Fog.Start) - ? 1.0f : (GLfloat)(1.0 / (ctx->Fog.End - ctx->Fog.Start)); + value[3] = 1.0f / (ctx->Fog.End - ctx->Fog.Start); return; case STATE_CLIPPLANE: { diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c index 098e6c02c..b1fd91a0e 100644 --- a/mesalib/src/mesa/state_tracker/st_manager.c +++ b/mesalib/src/mesa/state_tracker/st_manager.c @@ -189,7 +189,7 @@ st_framebuffer_validate(struct st_framebuffer *stfb, /* validate the fb */ do { - if (!stfb->iface->validate(stfb->iface, stfb->statts, + if (!stfb->iface->validate(&st->iface, stfb->iface, stfb->statts, stfb->num_statts, textures)) return; |