diff options
author | marha <marha@users.sourceforge.net> | 2013-07-16 08:53:23 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-16 08:53:23 +0200 |
commit | 06f4de23ace4de1fd628c37891214f0a4ecb77db (patch) | |
tree | 38ba52b20ef6060eab6e9b91e2c022e7a953e06b /mesalib/src/mesa | |
parent | ffce4319c2fb6f4f663cc5a9660e1d5837fcde87 (diff) | |
download | vcxsrv-06f4de23ace4de1fd628c37891214f0a4ecb77db.tar.gz vcxsrv-06f4de23ace4de1fd628c37891214f0a4ecb77db.tar.bz2 vcxsrv-06f4de23ace4de1fd628c37891214f0a4ecb77db.zip |
libxcb xcb-proto mesa xkbcomp git update 16 Jul 2013
libxcb commit 45619dc71e9411a526d7c69595cf615b1b1206cf
libxcb/xcb-proto commit 56a82005ac388fcb7a4d1c82e07c7e72eaf69a32
xkbcomp commit 1cd5c50c54b06de2238d6d7675d0a3c65a21414d
mesa commit e4fdf1b008ce29c5b5a52985c586b61f35d31e4c
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r-- | mesalib/src/mesa/main/enable.c | 21 | ||||
-rw-r--r-- | mesalib/src/mesa/main/errors.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/main/errors.h | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/main/getstring.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/main/hash_table.c | 4 | ||||
-rw-r--r-- | mesalib/src/mesa/main/mipmap.c | 4 | ||||
-rw-r--r-- | mesalib/src/mesa/main/mtypes.h | 32 | ||||
-rw-r--r-- | mesalib/src/mesa/main/multisample.c | 5 | ||||
-rw-r--r-- | mesalib/src/mesa/main/set.c | 4 | ||||
-rw-r--r-- | mesalib/src/mesa/main/texparam.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/main/texstore.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/main/uniforms.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/program/prog_parameter.c | 16 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 7 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c | 11 |
15 files changed, 71 insertions, 45 deletions
diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c index 5c72b3cd7..21e593117 100644 --- a/mesalib/src/mesa/main/enable.c +++ b/mesalib/src/mesa/main/enable.c @@ -1395,40 +1395,41 @@ _mesa_IsEnabled( GLenum cap ) case GL_VERTEX_ARRAY: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_enum_error; - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled != 0); + return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled; case GL_NORMAL_ARRAY: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_enum_error; - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled != 0); + return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled; case GL_COLOR_ARRAY: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_enum_error; - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled != 0); + return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled; case GL_INDEX_ARRAY: if (ctx->API != API_OPENGL_COMPAT) goto invalid_enum_error; - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled != 0); + return ctx->Array.ArrayObj-> + VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled; case GL_TEXTURE_COORD_ARRAY: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_enum_error; - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)] - .Enabled != 0); + return ctx->Array.ArrayObj-> + VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].Enabled; case GL_EDGE_FLAG_ARRAY: if (ctx->API != API_OPENGL_COMPAT) goto invalid_enum_error; - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled != 0); + return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled; case GL_FOG_COORDINATE_ARRAY_EXT: if (ctx->API != API_OPENGL_COMPAT) goto invalid_enum_error; - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled != 0); + return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled; case GL_SECONDARY_COLOR_ARRAY_EXT: if (ctx->API != API_OPENGL_COMPAT) goto invalid_enum_error; - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled != 0); + return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled; case GL_POINT_SIZE_ARRAY_OES: if (ctx->API != API_OPENGLES) goto invalid_enum_error; - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled != 0); + return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled; /* GL_ARB_texture_cube_map */ case GL_TEXTURE_CUBE_MAP_ARB: diff --git a/mesalib/src/mesa/main/errors.c b/mesalib/src/mesa/main/errors.c index 465420766..5a0758d0b 100644 --- a/mesalib/src/mesa/main/errors.c +++ b/mesalib/src/mesa/main/errors.c @@ -659,7 +659,7 @@ _mesa_DebugMessageControlARB(GLenum gl_source, GLenum gl_type, } void GLAPIENTRY -_mesa_DebugMessageCallbackARB(GLDEBUGPROCARB callback, GLvoid *userParam) +_mesa_DebugMessageCallbackARB(GLDEBUGPROCARB callback, const void *userParam) { GET_CURRENT_CONTEXT(ctx); ctx->Debug.Callback = callback; diff --git a/mesalib/src/mesa/main/errors.h b/mesalib/src/mesa/main/errors.h index 4b376fb60..5b4f36f55 100644 --- a/mesalib/src/mesa/main/errors.h +++ b/mesalib/src/mesa/main/errors.h @@ -101,7 +101,7 @@ _mesa_DebugMessageControlARB(GLenum source, GLenum type, GLenum severity, GLboolean enabled); void GLAPIENTRY _mesa_DebugMessageCallbackARB(GLDEBUGPROCARB callback, - GLvoid *userParam); + const void *userParam); #ifdef __cplusplus } diff --git a/mesalib/src/mesa/main/getstring.c b/mesalib/src/mesa/main/getstring.c index 39fd260dc..0e075427f 100644 --- a/mesalib/src/mesa/main/getstring.c +++ b/mesalib/src/mesa/main/getstring.c @@ -262,7 +262,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params ) case GL_DEBUG_CALLBACK_USER_PARAM_ARB: if (!_mesa_is_desktop_gl(ctx)) goto invalid_pname; - *params = ctx->Debug.CallbackData; + *params = (GLvoid *) ctx->Debug.CallbackData; break; default: goto invalid_pname; diff --git a/mesalib/src/mesa/main/hash_table.c b/mesalib/src/mesa/main/hash_table.c index af0510da1..008b4cdbc 100644 --- a/mesalib/src/mesa/main/hash_table.c +++ b/mesalib/src/mesa/main/hash_table.c @@ -110,8 +110,8 @@ entry_is_present(const struct hash_table *ht, struct hash_entry *entry) struct hash_table * _mesa_hash_table_create(void *mem_ctx, - bool key_equals_function(const void *a, - const void *b)) + bool (*key_equals_function)(const void *a, + const void *b)) { struct hash_table *ht; diff --git a/mesalib/src/mesa/main/mipmap.c b/mesalib/src/mesa/main/mipmap.c index f1e12e8cf..edf725721 100644 --- a/mesalib/src/mesa/main/mipmap.c +++ b/mesalib/src/mesa/main/mipmap.c @@ -1885,7 +1885,7 @@ generate_mipmap_uncompressed(struct gl_context *ctx, GLenum target, const struct gl_texture_image *srcImage, GLuint maxLevel) { - GLint level; + GLuint level; GLenum datatype; GLuint comps; @@ -2017,7 +2017,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target, struct gl_texture_image *srcImage, GLuint maxLevel) { - GLint level; + GLuint level; gl_format temp_format; GLint components; GLuint temp_src_stride; /* in bytes */ diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index 2f7cce7ba..ea139ea58 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -272,8 +272,6 @@ typedef enum /*@}*/ -/*********************************************/ - /** * Determine if the given gl_varying_slot appears in the fragment shader. */ @@ -673,7 +671,7 @@ struct gl_colorbuffer_attrib GLboolean _ClampFragmentColor; /** < with GL_FIXED_ONLY_ARB resolved */ GLenum ClampReadColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */ - GLboolean sRGBEnabled; /**< Framebuffer sRGB blending/updating requested */ + GLboolean sRGBEnabled; /**< Framebuffer sRGB blending/updating requested */ }; @@ -874,9 +872,8 @@ struct gl_multisample_attrib /* ARB_texture_multisample / GL3.2 additions */ GLboolean SampleMask; - GLbitfield SampleMaskValue; /* GL spec defines this as an array but >32x MSAA is - * madness - */ + /** The GL spec defines this as an array but >32x MSAA is madness */ + GLbitfield SampleMaskValue; }; @@ -1103,8 +1100,8 @@ struct gl_texture_image GLuint Face; /** GL_ARB_texture_multisample */ - GLuint NumSamples; /**< Sample count, or 0 for non-multisample */ - GLboolean FixedSampleLocations; /**< Same sample locations for all pixels? */ + GLuint NumSamples; /**< Sample count, or 0 for non-multisample */ + GLboolean FixedSampleLocations; /**< Same sample locations for all pixels? */ }; @@ -1546,7 +1543,8 @@ struct gl_array_attrib /** * Vertex arrays as consumed by a driver. - * The array pointer is set up only by the VBO module. */ + * The array pointer is set up only by the VBO module. + */ const struct gl_client_array **_DrawArrays; /**< 0..VERT_ATTRIB_MAX-1 */ }; @@ -2102,7 +2100,10 @@ struct gl_sl_pragmas */ struct gl_shader { - GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER || GL_GEOMETRY_SHADER_ARB (first field!) */ + /** GL_FRAGMENT_SHADER || GL_VERTEX_SHADER || GL_GEOMETRY_SHADER_ARB. + * Must be the first field. + */ + GLenum Type; GLuint Name; /**< AKA the handle */ GLint RefCount; /**< Reference count */ GLboolean DeletePending; @@ -2186,6 +2187,7 @@ typedef enum MESA_SHADER_TYPES = 3 } gl_shader_type; + struct gl_uniform_buffer_variable { char *Name; @@ -2207,12 +2209,15 @@ struct gl_uniform_buffer_variable GLboolean RowMajor; }; -enum gl_uniform_block_packing { + +enum gl_uniform_block_packing +{ ubo_packing_std140, ubo_packing_shared, ubo_packing_packed }; + struct gl_uniform_block { /** Declared name of the uniform block */ @@ -2244,6 +2249,7 @@ struct gl_uniform_block enum gl_uniform_block_packing _Packing; }; + /** * A GLSL program object. * Basically a linked collection of vertex and fragment shaders. @@ -2793,7 +2799,7 @@ struct gl_constants GLuint MaxTextureRectSize; /**< Max rectangle texture size, in pixes */ GLuint MaxTextureCoordUnits; GLuint MaxCombinedTextureImageUnits; - GLuint MaxTextureUnits; /**< = MIN(CoordUnits, FragmentProgram.ImageUnits) */ + GLuint MaxTextureUnits; /**< = MIN(CoordUnits, FragmentProgram.ImageUnits) */ GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */ GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */ GLuint MaxTextureBufferSize; /**< GL_ARB_texture_buffer_object */ @@ -3324,7 +3330,7 @@ struct gl_debug_namespace struct gl_debug_state { GLDEBUGPROCARB Callback; - GLvoid *CallbackData; + const void *CallbackData; GLboolean SyncOutput; GLboolean Defaults[MESA_DEBUG_SEVERITY_COUNT][MESA_DEBUG_SOURCE_COUNT][MESA_DEBUG_TYPE_COUNT]; struct gl_debug_namespace Namespaces[MESA_DEBUG_SOURCE_COUNT][MESA_DEBUG_TYPE_COUNT]; diff --git a/mesalib/src/mesa/main/multisample.c b/mesalib/src/mesa/main/multisample.c index 8b974c1b7..bd97c5096 100644 --- a/mesalib/src/mesa/main/multisample.c +++ b/mesalib/src/mesa/main/multisample.c @@ -80,7 +80,7 @@ _mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val) switch (pname) { case GL_SAMPLE_POSITION: { - if (index >= ctx->DrawBuffer->Visual.samples) { + if ((int) index >= ctx->DrawBuffer->Visual.samples) { _mesa_error( ctx, GL_INVALID_VALUE, "glGetMultisamplefv(index)" ); return; } @@ -197,5 +197,6 @@ _mesa_check_sample_count(struct gl_context *ctx, GLenum target, * "... or if samples is greater than MAX_SAMPLES, then the error * INVALID_VALUE is generated" */ - return samples > ctx->Const.MaxSamples ? GL_INVALID_VALUE : GL_NO_ERROR; + return (GLuint) samples > ctx->Const.MaxSamples + ? GL_INVALID_VALUE : GL_NO_ERROR; } diff --git a/mesalib/src/mesa/main/set.c b/mesalib/src/mesa/main/set.c index 2519b9694..dc3550c76 100644 --- a/mesalib/src/mesa/main/set.c +++ b/mesalib/src/mesa/main/set.c @@ -103,8 +103,8 @@ entry_is_present(struct set_entry *entry) struct set * _mesa_set_create(void *mem_ctx, - bool key_equals_function(const void *a, - const void *b)) + bool (*key_equals_function)(const void *a, + const void *b)) { struct set *ht; diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c index cf9a3014c..141cbe3ab 100644 --- a/mesalib/src/mesa/main/texparam.c +++ b/mesalib/src/mesa/main/texparam.c @@ -1547,7 +1547,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES: if (!_mesa_is_gles(ctx) || !ctx->Extensions.OES_EGL_image_external) goto invalid_pname; - *params = obj->RequiredTextureImageUnits; + *params = (GLfloat) obj->RequiredTextureImageUnits; break; case GL_TEXTURE_SRGB_DECODE_EXT: diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c index 9b66ad50b..04385e1e9 100644 --- a/mesalib/src/mesa/main/texstore.c +++ b/mesalib/src/mesa/main/texstore.c @@ -4143,7 +4143,7 @@ _mesa_store_compressed_texsubimage(struct gl_context *ctx, GLuint dims, const GLubyte *src; const gl_format texFormat = texImage->TexFormat; GLuint bw, bh; - GLuint slice; + GLint slice; if (dims == 1) { _mesa_problem(ctx, "Unexpected 1D compressed texsubimage call"); diff --git a/mesalib/src/mesa/main/uniforms.c b/mesalib/src/mesa/main/uniforms.c index 17e62403d..1e6f7f483 100644 --- a/mesalib/src/mesa/main/uniforms.c +++ b/mesalib/src/mesa/main/uniforms.c @@ -832,7 +832,7 @@ _mesa_get_uniform_name(const struct gl_uniform_storage *uni, * harm in always appending "[0]" to uniform array names. */ if (uni->array_elements != 0) { - unsigned i; + int i; /* The comparison is strange because *length does *NOT* include the * terminating NUL, but maxLength does. diff --git a/mesalib/src/mesa/program/prog_parameter.c b/mesalib/src/mesa/program/prog_parameter.c index 95b153e16..4d9cf08d2 100644 --- a/mesalib/src/mesa/program/prog_parameter.c +++ b/mesalib/src/mesa/program/prog_parameter.c @@ -155,7 +155,21 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, p->Size = size; p->DataType = datatype; if (values) { - COPY_4V(paramList->ParameterValues[oldNum + i], values); + if (size >= 4) { + COPY_4V(paramList->ParameterValues[oldNum + i], values); + } + else { + /* copy 1, 2 or 3 values */ + GLuint remaining = size % 4; + assert(remaining < 4); + for (j = 0; j < remaining; j++) { + paramList->ParameterValues[oldNum + i][j].f = values[j].f; + } + /* fill in remaining positions with zeros */ + for (; j < 4; j++) { + paramList->ParameterValues[oldNum + i][j].f = 0.0f; + } + } values += 4; p->Initialized = GL_TRUE; } diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 64e0a8a46..69c1b412b 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -2976,9 +2976,10 @@ glsl_to_tgsi_visitor::visit(ir_discard *ir) if (ir->condition) { ir->condition->accept(this); this->result.negate = ~this->result.negate; - emit(ir, TGSI_OPCODE_KIL, undef_dst, this->result); + emit(ir, TGSI_OPCODE_KILL_IF, undef_dst, this->result); } else { - emit(ir, TGSI_OPCODE_KILP); + /* unconditional kil */ + emit(ir, TGSI_OPCODE_KILL); } } @@ -4009,7 +4010,7 @@ get_bitmap_visitor(struct st_fragment_program *fp, src0.negate = NEGATE_XYZW; if (st->bitmap.tex_format == PIPE_FORMAT_L8_UNORM) src0.swizzle = SWIZZLE_XXXX; - inst = v->emit(NULL, TGSI_OPCODE_KIL, undef_dst, src0); + inst = v->emit(NULL, TGSI_OPCODE_KILL_IF, undef_dst, src0); /* Now copy the instructions from the original glsl_to_tgsi_visitor into the * new visitor. */ diff --git a/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c b/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c index dd9f4fc53..67c6f53f6 100644 --- a/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -585,9 +585,10 @@ translate_opcode( unsigned op ) case OPCODE_TRUNC: return TGSI_OPCODE_TRUNC; case OPCODE_KIL: - return TGSI_OPCODE_KIL; + return TGSI_OPCODE_KILL_IF; case OPCODE_KIL_NV: - return TGSI_OPCODE_KILP; + /* XXX we don't support condition codes in TGSI */ + return TGSI_OPCODE_KILL; case OPCODE_LG2: return TGSI_OPCODE_LG2; case OPCODE_LOG: @@ -614,8 +615,6 @@ translate_opcode( unsigned op ) return TGSI_OPCODE_RCP; case OPCODE_RET: return TGSI_OPCODE_RET; - case OPCODE_RSQ: - return TGSI_OPCODE_RSQ; case OPCODE_SCS: return TGSI_OPCODE_SCS; case OPCODE_SEQ: @@ -755,6 +754,10 @@ compile_instruction( emit_ddy( t, dst[0], &inst->SrcReg[0] ); break; + case OPCODE_RSQ: + ureg_RSQ( ureg, dst[0], ureg_abs(src[0]) ); + break; + default: ureg_insn( ureg, translate_opcode( inst->Opcode ), |