summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* dispatch: Make all API functions non-static.Paul Berry2012-11-0634-538/+1304
| | | | | | | | | | | | | | | | | Some of the functions that we store in the dispatch table are declared as non-static in their .c files and are inserted into the dispatch table directly by _mesa_create_exec_table(). Other functions are declared as static, and are inserted into the dispatch table by a dedicated function that lives in the same .c file (e.g. _mesa_loopback_init_api_table() in api_loopback.c). This patch makes all of these functions non-static, and creates appropriate prototypes for them, so that in future patches we can populate the entire dispatch table using a single code-generated function. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* dispatch: Remove a few FEATURE_ES1 conditionals.Paul Berry2012-11-065-18/+1
| | | | | | | | This allows the GLES1.1 dispatch sanity test to be run on all builds, even builds that do not include GLES1 support. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: assert that key->fragprog_inputs_read value isn't too largeBrian Paul2012-11-061-0/+2
| | | | | | | fragprog_inputs_read is a 12-bit bitfield so check the assigned value. MSVC warns on the assignment. Not easy to fix but let's do a sanity check. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: fix MSVC signed/unsigned warnings in context.cBrian Paul2012-11-061-2/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: fix MSVC signed/unsigned warnings in transformfeedback.cBrian Paul2012-11-061-2/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* swrast: fix MSVC signed/unsigned warningsBrian Paul2012-11-061-2/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* tnl: fix MSVC signed/unsigned warningsBrian Paul2012-11-061-1/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: silence MSVC signed/unsigned warning in texgetmage.cBrian Paul2012-11-061-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: silence MSVC signed/unsigned warning in texstorage.cBrian Paul2012-11-061-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* vbo: use GLuint for numInstances to silence MSVC warningsBrian Paul2012-11-062-2/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: fix signed/unsigned MSVC warnings in fbobject.cBrian Paul2012-11-061-2/+3
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: s/GLint/GLuint/ in matrix.c to silence MSVC warningsBrian Paul2012-11-061-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: s/int/GLuint/ in get.c to silence MSVC warningsBrian Paul2012-11-061-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: fix assorted MSVC conversion warnings in format_pack.cBrian Paul2012-11-061-10/+10
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: change glsl_to_tgsi_visitor from class to structBrian Paul2012-11-061-1/+1
| | | | | | To match the declaration in the .h file and silence an MSVC warning. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: add int cast to silence warningBrian Paul2012-11-061-1/+1
| | | | | | MSVC warns that negating an unsigned value yields an unsigned value. Reviewed-by: Jose Fonseca <[email protected]>
* vbo: fix glVertexAttribI* functionsMarek Olšák2012-11-0610-63/+179
| | | | | | | | | | | | | | | | | | | | | | The functions were broken, because they converted ints to floats. Now we can finally advertise OpenGL 3.0. ;) In this commit, the vbo module also tracks the type for each attrib in addition to the size. It can be one of FLOAT, INT, UNSIGNED_INT. The little ugliness is the vertex attribs are declared as floats even though there may be integer values. The code just copies integer values into them without any conversion. This implementation passes the glVertexAttribI piglit test which I am going to commit in piglit soon. The test covers vertex arrays, immediate mode and display lists. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> v2: cosmetic changes as suggested by Brian
* meta: Remove redundant code in _mesa_meta_GenerateMipmapAnuj Phogat2012-11-051-61/+4
| | | | | | | | | Integer textures generate invalid operation in glGenerateMipmap. So, the code related to integer textures is now redundant. Note: This is a candidate for stable branches. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Generate invalid operation in glGenerateMipMap for integer texturesAnuj Phogat2012-11-051-0/+9
| | | | | | | | | | | | | | | Khronos has reached a conclusion and disallowed following texture formats in glGenerateMipMap(): (a) ASTC textures (b) integer internal formats (e.g., RGBA8UI, RG16I) (c) textures with stencil formats (e.g., STENCIL_INDEX8) (d) textures with packed depth/stencil formats (e.g, DEPTH24_STENCIL8) https://cvs.khronos.org/bugzilla/show_bug.cgi?id=9471 Note: This is a candidate for stable branches. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Use "non-gen name" more consistently as an error message in GL core.Eric Anholt2012-11-042-2/+2
| | | | | | | | | I used this to help verify that my test was actually testing the paths I wanted to. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix core GL genned-name handling for glBeginQuery().Eric Anholt2012-11-041-5/+11
| | | | | | | | | Fixes piglit gl-3.1/genned-names. NOTE: This is a candidate for the 9.0 branch. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix the core GL genned-name handling for glBindBufferBase()/Range().Eric Anholt2012-11-041-8/+14
| | | | | | | | | | | This is part of fixing gl-3.1/genned-names. v2: Fix a missing return value. NOTE: This is a candidate for the 9.0 branch. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Fix oversized initial allocation of the state cache table pointers.Vandrus Zoltán2012-11-041-1/+1
| | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55030
* i965: Force border color A to 1 when it's not present in the GL format.Eric Anholt2012-11-041-0/+7
| | | | | | | | | | It's usually forced to 1 by the surface format, but sometimes we actually have alpha present because it's the only format available. Fixes piglit texwrap bordercolor tests for OpenGL 1.1, GL_EXT_texture_sRGB and GL_ARB_texture_float. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fix uploading user vertex arrays with basevertex set.Eric Anholt2012-11-043-2/+7
| | | | | | | | | | | If the index buffer is full of values like "0 1 2 3", but basevertex is 4, we need to upload at least vertex data for elements 4 5 6 7. Whether we also upload 0 1 2 3 is a question of whether there are VBOs present or not -- see the code setting start_vertex_bias in brw_draw_upload.c. Fixes piglit draw-elements*base-vertex user_varrays Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Set dirty state for brw_draw_upload.c when num_instances changes.Eric Anholt2012-11-041-1/+4
| | | | | | | | Otherwise, if we had a set of prims passed in with a num_instances varying between them, we wouldn't upload enough (or too much!) from user vertex arrays. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove the vbo_rebase_prims() path.Eric Anholt2012-11-041-15/+6
| | | | | | | | The brw_draw_upload.c start_vertex_bias code has support for doing the rebase without rewriting the index buffer by applying a basevertex. It looks like vbo_rebase_prims() is not equipped to handle basevertex. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Fix a comment in copy propagation.Eric Anholt2012-11-041-1/+3
| | | | | | | We haven't been only tracking raw GRF-GRF moves since the constant propagation merge, and also the extension for source modifiers and uniforms. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Allow copy-propagation on pull constant load values.Eric Anholt2012-11-041-3/+4
| | | | | | | | | | | | Given that we handle similarly-regioned GRFs registers for our copy propagation from our UNIFORM file, there's no reason not to allow it. The shader-db impact is negligible -- +90 instructions total, 2 shaders helped and 7 hurt (slightly increased register pressure increased spilling), but this is to prevent regression in other shaders when fixing copy_propagation to reduce register pressure in the shaders that are hurt here. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Do dead code elimination just after copy propagation.Eric Anholt2012-11-041-1/+1
| | | | | | | | | | | | | | | | If we put the register coalescing in between the two, then we end up with code sequences involving dead writes that the dead code elimination doesn't know how to remove. In place of making dead code elimination smart (which we should do, too), make it less important for the moment. shader-db results: total instructions in shared programs: 722240 -> 721275 (-0.13%) instructions in affected programs: 50573 -> 49608 (-1.91%) (no shaders regressed). Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Compact the virtual GRF arrays.Kenneth Graunke2012-11-032-0/+61
| | | | | | | | | | | | | | During code generation, we create tons of temporary variables, many of which get immediately killed and are never used. Later optimization and analysis passes, such as compute_live_intervals, loop over all the virtual GRFs. By compacting them, we can save a lot of overhead. Reduces compilation time in L4D2's largest fragment shader from 10.2 seconds to 5.2 seconds (50%). Drops compute_live_variables() from 10-12% of another game's startup time to 8%. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* dispatch_sanity test: add GL CORE 3.1 testJordan Justen2012-11-031-0/+705
| | | | | | | | | | The function list was generated from glcorearb.h for GL 4.3. Note that many GL 4.X functions are commented out, and indicate that they need to be added to Mesa's XML. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* dispatch_sanity test: create common context creation functionJordan Justen2012-11-031-36/+16
| | | | | | | | We also no longer call _swrast_CreateContext, _tnl_CreateContext or _swsetup_CreateContext when creating the context. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* dispatch_sanity test: allow newer functions to be set to NOPJordan Justen2012-11-031-3/+11
| | | | | | | | | If a GL function was introduced in a later GL version than the context we are testing, then it is okay if it is set to the _mesa_generic_nop function. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* dispatch_sanity test: pass ctx to validate_functions/nopsJordan Justen2012-11-031-9/+13
| | | | | | | This will allow validate_functions to access ctx->Version. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* dispatch_sanity test: add version to function listJordan Justen2012-11-031-460/+461
| | | | | | | | | This will be used by GL CORE contexts to differentiate functions that can be set to nop from functions that are required for a particular context version. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: remove unimplemented FramebufferTextureFaceARBJordan Justen2012-11-033-19/+0
| | | | | | | | This function can be re-added with an actual implementation when ARB_geometry_shader4 is supported. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: remove unimplemented FramebufferTextureARBJordan Justen2012-11-033-16/+0
| | | | | | | | This function can be re-added with an actual implementation when ARB_geometry_shader4 is supported. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: disable ProgramParameteri until it is neededJordan Justen2012-11-031-4/+0
| | | | | | | | | ProgramParameteri will be required for ARB_geometry_shader4 or GLES3. Don't enable this function until either of those is supported. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glapi: alias ProgramParameteriARB to ProgramParameteriJordan Justen2012-11-032-4/+4
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glapi: alias FramebufferTextureARB to FramebufferTextureJordan Justen2012-11-032-4/+4
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa shaderapi: don't enable various functions for GL COREJordan Justen2012-11-031-0/+2
| | | | | | | | | | | These EXT_separate_shader_objects function will no longer be enabled for CORE profiles: * UseShaderProgramEXT * ActiveProgramEXT * CreateShaderProgramEXT Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa api_exec: disable StencilFuncSeparateATI for API_OPENGL_COREJordan Justen2012-11-031-1/+1
| | | | | | | This was mistakenly enabled in a21116f. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa api_exec: add comment regarding GetPointerv & CORE profilesJordan Justen2012-11-031-0/+4
| | | | | | | GetPointerv was de-deprecated in 893ddb. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965: Remove unused variables after removing the old VS backend.Kenneth Graunke2012-11-011-2/+0
| | | | Fixes compiler warnings about unused variables.
* i965: Remove unnecessary walk through Mesa IR in ProgramStringNotify().Kenneth Graunke2012-11-011-82/+0
| | | | | | | | | | | | | Variable indexing of non-uniform arrays only exists in GLSL. Likewise, OPCODE_CAL/OPCODE_RET only existed to try and support GLSL's function calls. We don't use Mesa IR for GLSL, and these features are explicitly disallowed by ARB_vertex_program/ARB_fragment_program and never generated by ffvertex_prog.c. Since they'll never happen, there's no need to check for them, which saves us from walking through all the Mesa IR instructions. Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove VS constant buffer read support from brw_eu_emit.c.Kenneth Graunke2012-11-012-121/+0
| | | | | | | brw_vec4_emit.cpp implements this directly; only the old backend used the brw_eu_emit.c code. Reviewed-by: Eric Anholt <[email protected]>
* i965: Update comment about clipper constants.Kenneth Graunke2012-11-011-9/+1
| | | | | | | The old VS backend doesn't exist, but I believe these still need to be delivered to the clipper thread. Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Remove brw_vs_compile::constant_map.Kenneth Graunke2012-11-012-18/+1
| | | | | | It was only used for the old backend. Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Remove support for the old parameter layout.Kenneth Graunke2012-11-015-70/+7
| | | | | | Only the old backend used it. Reviewed-by: Eric Anholt <[email protected]>