summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: trim down #includes in api_loopback.hBrian Paul2015-03-021-6/+1
| | | | Acked-by: Matt Turner <[email protected]>
* mesa: trim down includes of compiler.hBrian Paul2015-03-0214-21/+6
| | | | | | | In some cases, glheader.h is the right #include. Also remove some instances of struct _glapi_table declarations. Acked-by: Matt Turner <[email protected]>
* mesa: include macros.h in stencil.hBrian Paul2015-02-281-0/+1
| | | | | | Since it uses the CLAMP macro. Reviewed-by: Ian Romanick <[email protected]>
* mesa: move finite macro to imports.hBrian Paul2015-02-282-8/+8
| | | | | | Move it to the only place it's used. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove _NORMAPI, _NORMAPIP macrosBrian Paul2015-02-281-7/+0
| | | | | | Was only used in one place. Use equivalent _XFORMAPIP there instead. Reviewed-by: Ian Romanick <[email protected]>
* mesa: move FLT_MAX_EXP to c99_math.hBrian Paul2015-02-281-4/+0
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: move ONE_DIV_SQRT_LN2 to prog_statevars.cBrian Paul2015-02-281-4/+0
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove unused uninitialized_var() macroBrian Paul2015-02-281-8/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: silence unused var warning in get_tex_rgba_uncompressed()Brian Paul2015-02-271-1/+2
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* mesa: move declaration before codeBrian Paul2015-02-271-2/+3
| | | | | | To fix MinGW warning. Reviewed-by: Anuj Phogat <[email protected]>
* main: Fix whitespace in teximage.c.Laura Ekstrand2015-02-271-1/+1
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: restore #include stdarg.h in imports.hBrian Paul2015-02-271-0/+1
| | | | | https://bugs.freedesktop.org/show_bug.cgi?id=89345 Signed-off-by: Brian Paul <[email protected]>
* main: Fix target checking for CompressedTexSubImage*D.Laura Ekstrand2015-02-261-15/+65
| | | | | | | | | | | | | This fixes a dEQP test failure. In the test, glCompressedTexSubImage2D was called with target = 0 and failed to throw INVALID ENUM. This failure was caused by _mesa_get_current_tex_object(ctx, target) being called before the target checking. To remedy this, target checking was made into its own function and called prior to _mesa_get_current_tex_object. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89311 Reviewed-by: Anuj Phogat <[email protected]>
* main: Fix target checking for CopyTexSubImage*D.Laura Ekstrand2015-02-261-8/+54
| | | | | | | | | | | | | This fixes a dEQP test failure. In the test, glCopyTexSubImage2D was called with target = 0 and failed to throw INVALID ENUM. This failure was caused by _mesa_get_current_tex_object(ctx, target) being called before the target checking. To remedy this, target checking was separated from the main error-checking function and called prior to _mesa_get_current_tex_object. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89312 Reviewed-by: Anuj Phogat <[email protected]>
* mesa: remove unused INLINE macro from compiler.hBrian Paul2015-02-261-7/+0
| | | | | | We now use 'inline' everywhere in Mesa. Reviewed-by: Alex Deucher <[email protected]>
* mesa: don't include stdint.h in compiler.hBrian Paul2015-02-261-6/+0
| | | | | | | Not needed. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: don't include math.h in compiler.hBrian Paul2015-02-262-1/+1
| | | | | | | | Not needed by anything in that header. Include math.h or c99_math.h where needed instead. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: trim down #includes in compiler.hBrian Paul2015-02-263-4/+3
| | | | | | | | Don't include stuff we don't need. Fix a few #includes elsewhere to keep thing building. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: don't include limits.h in compiler.hBrian Paul2015-02-261-1/+0
| | | | | | | Not needed. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: don't include float.h in compiler.hBrian Paul2015-02-261-1/+0
| | | | | | | Not needed. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: only include ctype.h where it's usedBrian Paul2015-02-261-1/+0
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: include stdarg.h only where it's usedBrian Paul2015-02-263-3/+2
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove M_PI, M_E, M_LOG2E macro definitionsBrian Paul2015-02-261-13/+0
| | | | | | | Should be defined in math.h. If not, we can add them to c99_math.h Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: use fi_type in vertex attribute codeMarius Predut2015-02-252-17/+20
| | | | | | | | | | | | | | | | | | | | | | | For 32-bit builds, floating point operations use x86 FPU registers, not SSE registers. If we're actually storing an integer in a float variable, the value might get modified when written to memory. This patch changes the VBO code to use the fi_type (float/int union) to store/copy vertex attributes. Also, this can improve performance on x86 because moving floats with integer registers instead of FP registers is faster. Neil Roberts review: - include changes on all places that are storing attribute values. - check with and without -O3 compiler flag. Brian Paul review: - use fi_type type instead gl_constant_value type - fix a bunch of nit-picks. - fix compiler warnings Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82668 Signed-off-by: Marius Predut <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove DEG2RAD macroBrian Paul2015-02-242-9/+1
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove MAX_GLUSHORT, move MAX_GLUINTBrian Paul2015-02-241-3/+0
| | | | | | The later is only used in one place in swrast. Reviewed-by: Matt Turner <[email protected]>
* mesa: move signbit() macro to c99_math.hBrian Paul2015-02-241-8/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused isblank() functionBrian Paul2015-02-241-1/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove sqrtf macroBrian Paul2015-02-241-11/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove INV_SQRTF() macroBrian Paul2015-02-243-12/+3
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: remove ceilf, floorf macrosBrian Paul2015-02-241-2/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove expf macroBrian Paul2015-02-241-1/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove logf macroBrian Paul2015-02-241-1/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove powf macroBrian Paul2015-02-242-1/+1
| | | | | | Use the wrapper in c99_math.h if needed. Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused exp2f, log2f, truncf wrappersBrian Paul2015-02-241-10/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused acosf, asinf, atan2f, etc. macrosBrian Paul2015-02-241-16/+0
| | | | | | | Not used anywhere. If any of these are needed, they should be added to c99_math.h Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FABSF with fabsfBrian Paul2015-02-241-11/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FLOORF with floorfBrian Paul2015-02-242-4/+2
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused CEILF macroBrian Paul2015-02-241-3/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace LOGF, EXPF with logf, expfBrian Paul2015-02-241-6/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FREXPF, LDEXPF with frexpf, ldexpfBrian Paul2015-02-241-6/+0
| | | | | | Start getting rid of some imports.h macros. Use the c99 functions instead. Reviewed-by: Matt Turner <[email protected]>
* mesa: add a missing GS support check in GetActiveUniformBlockivMarek Olšák2015-02-241-0/+2
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add missing error checks to GetProgramInfoLog, GetShaderInfoLog and ↵Eduardo Lima Mitev2015-02-241-6/+32
| | | | | | | | | | | GetProgramiv Fixes 3 dEQP tests: * dEQP-GLES3.functional.negative_api.state.get_program_info_log * dEQP-GLES3.functional.negative_api.state.get_shader_info_log * dEQP-GLES3.functional.negative_api.state.get_programiv Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix ctx->Texture.CubeMapSeamlessIago Toral Quiroga2015-02-241-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intel driver code, and apparently all other Mesa drivers, call _mesa_initialize_context early in the CreateContext hook. That function will end up calling _mesa_init_texture which will do: ctx->Texture.CubeMapSeamless = _mesa_is_gles3(ctx); But this won't work at this point, since _mesa_is_gles3 requires ctx->Version to be set and that will not happen until late in the CreateContext hook, when _mesa_compute_version is called. We can't just move the call to _mesa_compute_version before _mesa_initialize_context since it needs that available extensions have been computed, which again requires other things to be initialized, etc. Instead, we enable seamless cube maps since GLES2, which should work for most implementations, and expect drivers that don't support this to disable it manually as part of their context initialization setup. Fixes the following 192 dEQP tests: dEQP-GLES3.functional.texture.filtering.cube.formats.* dEQP-GLES3.functional.texture.filtering.cube.sizes.* dEQP-GLES3.functional.texture.filtering.cube.combinations.* dEQP-GLES3.functional.texture.mipmap.cube.* dEQP-GLES3.functional.texture.vertex.cube.filtering.* dEQP-GLES3.functional.texture.vertex.cube.wrap.* dEQP-GLES3.functional.shaders.texture_functions.texturelod.samplercube_fixed_* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Return error if BeginQuery is called with an existing object of ↵Eduardo Lima Mitev2015-02-241-0/+16
| | | | | | | | | | | | | | | | | | | different type Section 2.14 Asynchronous Queries, page 84 of the OpenGL ES 3.0.4 spec states: "BeginQuery generates an INVALID_OPERATION error if any of the following conditions hold: [...] id is the name of an existing query object whose type does not match target; [...] Similar wording exists in the OpenGL 4.5 spec, section 4.2. QUERY OBJECTS AND ASYNCHRONOUS QUERIES, page 43. Fixes 1 dEQP test: * dEQP-GLES3.functional.negative_api.fragment.begin_query Reviewed-by: Ian Romanick <[email protected]>
* mesa: Return INVALID_OPERATION when querying a never bound Query objEduardo Lima Mitev2015-02-241-4/+4
| | | | | | | | | | | | | | | | | Section 2.14 Asynchronous Queries, page 84 of the OpenGL ES 3.0.4 states: "The command void GenQueries( sizei n, uint *ids ); returns n previously unused query object names in ids. These names are marked as used, for the purposes of GenQueries only, but no object is associated with them until the first time they are used by BeginQuery." This means that any attempt to use or query a Query object id before it has ever been bound by calling glBeginQuery, should be assume to be an invalid object. Fixes 1 dEQP test: * dEQP-GLES3.functional.negative_api.state.get_query_objectuiv Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add _mesa_is_array_texture helperIago Toral Quiroga2015-02-242-0/+25
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix error validating args for TexSubImage3DEduardo Lima Mitev2015-02-241-2/+2
| | | | | | | | | | | | | The zoffset and depth values were not being considered when calling error_check_subtexture_dimensions(). Fixes 2 dEQP tests: * dEQP-GLES3.functional.negative_api.texture.texsubimage3d_neg_offset * dEQP-GLES3.functional.negative_api.texture.texsubimage3d_invalid_offset Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: "10.4 10.5" <[email protected]>
* mesa: Move START/END_FAST_MATH macros to their only use.Matt Turner2015-02-231-79/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove definition of NULL.Matt Turner2015-02-231-4/+0
| | | | | | If your stdlib.h doesn't define this you should fix your stdlib.h. Reviewed-by: Eric Anholt <[email protected]>