aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-09-08 23:30:36 +0200
committermarha <marha@users.sourceforge.net>2014-09-08 23:30:36 +0200
commite16399e57caac9e859a7d28921c73ef9839b571e (patch)
treeb86ed43f749ebfe0bb3842fcd76a34e386011fcc /mesalib/src/mesa/main
parent166caebfaa2b217332a345ffb02c5b9e52f65a3d (diff)
parentcb346e228aeb500cd61ec86644c034c238332d3b (diff)
downloadvcxsrv-e16399e57caac9e859a7d28921c73ef9839b571e.tar.gz
vcxsrv-e16399e57caac9e859a7d28921c73ef9839b571e.tar.bz2
vcxsrv-e16399e57caac9e859a7d28921c73ef9839b571e.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/api_arrayelt.c4
-rw-r--r--mesalib/src/mesa/main/atifragshader.c8
-rw-r--r--mesalib/src/mesa/main/attrib.c4
-rw-r--r--mesalib/src/mesa/main/compiler.h2
-rw-r--r--mesalib/src/mesa/main/context.c3
-rw-r--r--mesalib/src/mesa/main/macros.h11
-rw-r--r--mesalib/src/mesa/main/texstore.c4
7 files changed, 27 insertions, 9 deletions
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 <CoreFoundation/CFByteOrder.h>
#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 947efac1f..e1880f59b 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;
}