From cb346e228aeb500cd61ec86644c034c238332d3b Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 8 Sep 2014 23:27:52 +0200 Subject: xkeyboard-config mesa git update 8 Sep 2014 xkeyboard-config commit 1b9901151cdb22e413319e6fca80fbbfc5e51502 mesa commit 12fb74fe895fe9954df127ca0ec6e4422fffb156 --- mesalib/src/mesa/main/api_arrayelt.c | 4 ++-- mesalib/src/mesa/main/atifragshader.c | 8 ++++---- mesalib/src/mesa/main/attrib.c | 4 ++++ mesalib/src/mesa/main/compiler.h | 2 +- mesalib/src/mesa/main/context.c | 3 +++ mesalib/src/mesa/main/macros.h | 11 +++++++++-- mesalib/src/mesa/main/texstore.c | 4 ++++ 7 files changed, 27 insertions(+), 9 deletions(-) (limited to 'mesalib/src/mesa/main') diff --git a/mesalib/src/mesa/main/api_arrayelt.c b/mesalib/src/mesa/main/api_arrayelt.c index ebeba8883..536326f6e 100644 --- a/mesalib/src/mesa/main/api_arrayelt.c +++ b/mesalib/src/mesa/main/api_arrayelt.c @@ -75,7 +75,7 @@ typedef struct { /** Cast wrapper */ -static INLINE AEcontext * +static inline AEcontext * AE_CONTEXT(struct gl_context *ctx) { return (AEcontext *) ctx->aelt_context; @@ -87,7 +87,7 @@ AE_CONTEXT(struct gl_context *ctx) * in the range [0, 7]. Luckily these type tokens are sequentially * numbered in gl.h, except for GL_DOUBLE. */ -static INLINE int +static inline int TYPE_IDX(GLenum t) { return t == GL_DOUBLE ? 7 : t & 7; diff --git a/mesalib/src/mesa/main/atifragshader.c b/mesalib/src/mesa/main/atifragshader.c index 7077c96f1..1eab7731a 100644 --- a/mesalib/src/mesa/main/atifragshader.c +++ b/mesalib/src/mesa/main/atifragshader.c @@ -325,11 +325,11 @@ _mesa_BeginFragmentShaderATI(void) a start */ for (i = 0; i < MAX_NUM_PASSES_ATI; i++) { ctx->ATIFragmentShader.Current->Instructions[i] = - calloc(1, sizeof(struct atifs_instruction) * - (MAX_NUM_INSTRUCTIONS_PER_PASS_ATI)); + calloc(sizeof(struct atifs_instruction), + MAX_NUM_INSTRUCTIONS_PER_PASS_ATI); ctx->ATIFragmentShader.Current->SetupInst[i] = - calloc(1, sizeof(struct atifs_setupinst) * - (MAX_NUM_FRAGMENT_REGISTERS_ATI)); + calloc(sizeof(struct atifs_setupinst), + MAX_NUM_FRAGMENT_REGISTERS_ATI); } /* can't rely on calloc for initialization as it's possible to redefine a shader (?) */ diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c index c656845df..2e289b6f1 100644 --- a/mesalib/src/mesa/main/attrib.c +++ b/mesalib/src/mesa/main/attrib.c @@ -1488,6 +1488,10 @@ copy_array_attrib(struct gl_context *ctx, /* skip ArrayBufferObj */ /* skip IndexBufferObj */ + + /* Invalidate draw state. It will be updated during the next draw. */ + dest->DrawMethod = DRAW_NONE; + dest->_DrawArrays = NULL; } /** diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h index 35160223e..813bf1905 100644 --- a/mesalib/src/mesa/main/compiler.h +++ b/mesalib/src/mesa/main/compiler.h @@ -151,7 +151,7 @@ extern "C" { #include #define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x ) #elif (defined(_AIX) || defined(__blrts)) -static INLINE GLuint CPU_TO_LE32(GLuint x) +static inline GLuint CPU_TO_LE32(GLuint x) { return (((x & 0x000000ff) << 24) | ((x & 0x0000ff00) << 8) | diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index fbdbd680a..8b5693e37 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -653,6 +653,9 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api) /* GL_ARB_framebuffer_object */ consts->MaxSamples = 0; + /* GLSL default if NativeIntegers == FALSE */ + consts->UniformBooleanTrue = FLT_AS_UINT(1.0f); + /* GL_ARB_sync */ consts->MaxServerWaitTimeout = 0x1fff7fffffffULL; diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h index 0ba658a9a..7b6148d09 100644 --- a/mesalib/src/mesa/main/macros.h +++ b/mesalib/src/mesa/main/macros.h @@ -184,12 +184,19 @@ 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. * * \param frac_bits The number of bits used to store the fractional part. */ -static INLINE uint32_t +static inline uint32_t U_FIXED(float value, uint32_t frac_bits) { value *= (1 << frac_bits); @@ -201,7 +208,7 @@ U_FIXED(float value, uint32_t frac_bits) * * \param frac_bits The number of bits used to store the fractional part. */ -static INLINE int32_t +static inline int32_t S_FIXED(float value, uint32_t frac_bits) { return (int32_t) (value * (1 << frac_bits)); diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c index d2aba8ba1..f913e42d3 100644 --- a/mesalib/src/mesa/main/texstore.c +++ b/mesalib/src/mesa/main/texstore.c @@ -1634,6 +1634,8 @@ texstore_via_float(TEXSTORE_PARAMS) } } + free(tmp_row); + return GL_TRUE; } @@ -1702,6 +1704,8 @@ texstore_rgba_integer(TEXSTORE_PARAMS) } } + free(tmp_row); + return GL_TRUE; } -- cgit v1.2.3