summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: fix comment typo: s/formaat/format/Brian Paul2013-01-291-1/+1
|
* mesa: don't enable GL_EXT_framebuffer_multisample for software driversBrian Paul2013-01-291-1/+0
| | | | | | Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* Remove APIspec.dtdMatt Turner2013-01-281-52/+0
| | | | Left behind by a8ab7e33.
* mesa: add casts in _mesa_GetTexParameterfv() to silence warningsBrian Paul2013-01-251-4/+4
| | | | | | There are other similar int->float casts elsewhere in the function. Reviewed-by: José Fonseca <[email protected]>
* glsl: Add infrastructure for ARB_shading_language_packingMatt Turner2013-01-252-0/+2
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Print more informative debug for _mesa_do_init_remap_table().Eric Anholt2013-01-251-2/+4
| | | | | | This is the same logic from _mesa_map_function_array(). Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add gl_uniform_buffer_variable::IndexName fieldIan Romanick2013-01-252-1/+14
| | | | | | | | | | | | | glGetUniformIndices requires that the block instance index not be present in the name of queried uniforms. However, gl_uniform_buffer_variable::Name will include the instance index. The IndexName field is added to handle this difference. Note that currently IndexName will always point to the same string as Name. This will change soon. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]>
* mesa: Track the packing mode of a UBO in gl_uniform_bufferIan Romanick2013-01-251-0/+14
| | | | | | | | | This allows the next patch to verify that two uniform blocks match without first calculating the locations of the fields. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es3: Enable ES 3.0 API and shading language versionIan Romanick2013-01-252-2/+27
| | | | | | | | v2: Add ARB_internalformat_query to the list of required extensions. v3: Add OES_depth_texture_cube_map to the list of required extensions. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Remove rounding bias in _mesa_float_to_half()Chad Versace2013-01-241-29/+37
| | | | | | | | | | | | | | | | | | | | | | | Not all float32 values can be exactly represented as a float16. _mesa_float_to_half() rounded such intermediate float32 values to zero by truncating unrepresentable bits in the mantissa. This patch improves _mesa_float_to_half() by rounding intermediate float32 values to the nearest float16; when the float32 is exactly between two float16 values we round to the one with an even mantissa. This behavior is preferred over the old behavior because: - It has reduced bias relative to the old behavior. - It reproduces the behavior of real hardware: opcode F32TO16 in Intel's GPU ISA. - By reproducing the behavior of the GPU (at least on Intel hardware), compile-time evaluation of constant packHalf2x16 GLSL expressions will result in the same value as if the expression were executed on the GPU. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* mesa,glsl: Move round_to_even() from glsl to mesa/main (v2)Chad Versace2013-01-242-0/+23
| | | | | | | | | | | | | Move round_to_even's definition to mesa/main so that _mesa_float_to_half() can use it in order to eliminate rounding bias. In additon to moving the fuction definition, prefix its name with "_mesa", just as all other functions in mesa/main are prefixed. v2: Fix Android build. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* glsl: Eliminate ambiguity between function ins/outs and shader ins/outsPaul Berry2013-01-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces the three ir_variable_mode enums: - ir_var_in - ir_var_out - ir_var_inout with the following five: - ir_var_shader_in - ir_var_shader_out - ir_var_function_in - ir_var_function_out - ir_var_function_inout This eliminates a frustrating ambiguity: it used to be impossible to tell whether an ir_var_{in,out} variable was a shader in/out or a function in/out without seeing where the variable was declared in the IR. This complicated some optimization and lowering passes, and would have become a problem for implementing varying structs. In the lisp-style serialization of GLSL IR to strings performed by ir_print_visitor.cpp and ir_reader.cpp, I've retained the names "in", "out", and "inout" for function parameters, to avoid introducing code churn to the src/glsl/builtins/ir/ directory. Note: a couple of comments in the code seemed to indicate that we were planning for a possible future in which geometry shaders could have shader-scope inout variables. Our GLSL grammar rejects shader-scope inout variables, and I've been unable to find any evidence in the GLSL standards documents (or extensions) that this will ever be allowed, so I've eliminated these comments. Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Like EXT_texture_compression_dxt1, advertise ↵Ian Romanick2013-01-233-20/+8
| | | | | | | | | | | | | | | ANGLE_texture_compression_dxt in all APIs This is technically outside the ANGLE spec, but it seems unlikely to cause any harm. v2: Simplify the extension checks by assuming the ANGLE extension will always be enabled by any driver that enables the EXT. Suggested by Eric Anholt. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Lee Salzman <[email protected]>
* mesa: Simplify _mesa_choose_tex_format handling of compressed formatsIan Romanick2013-01-231-167/+75
| | | | | | | | | | | | | For non-generic compressed format we assert two things: 1. The format has already been validated against the set of available extensions. 2. The driver only enables the extension if it supports all of the formats that are part of that extension. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Use a single flag for the S3TC extensions that don't require on-line ↵Ian Romanick2013-01-236-9/+13
| | | | | | | | compression Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Lee Salzman <[email protected]>
* ReadPixels: Force ALPHA to 1 while rebasing RGBA values for GL_RGB formatCarl Worth2013-01-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | When performing a ReadPixels operation, we may be reading from a buffer that stores alpha values, but that is actually representing a buffer with no alpha channel. In this case, while rebasing the values, touch up all alpha values read to 1.0. This commit fixes the following piglit (sub) tests: ARB_texture_float/fbo-colormask-formats GL_RBG16F_ARB EXT_texture_snorm/fbo-colormask-formats GL_RGB16_SNORM GL_RGB8_SNORM GL_RGB_SNORM It likely improves the results of other tests as well, but a PASS remains elusive due to additional bugs. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa/es3: Apply stricter multisample blit rules for ES3.Ian Romanick2013-01-221-13/+48
| | | | | | | | Fixes gles3conform framebuffer_blit_error_blitframebuffer_multisampled_read_buffer_different_origins. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/es3: Disallow FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE query of ↵Ian Romanick2013-01-221-0/+16
| | | | | | | | | | DEPTH_STENCIL_ATTACHMENT This error was added in the 3.0.1 update to the OpenGL ES 3.0 spec. Fixes the updated gles3conform packed_depth_stencil_parameters test. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't allow blits to / from the same buffer in OpenGL ES 3.0Ian Romanick2013-01-221-0/+31
| | | | | | | | | | Fixes gles3conform test CoverageES30. It temporarily regresses some framebuffer_blit tests, but the failing subcases have been determined to be invalid for OpenGL ES 3.0. v2: Fix typo in depth (and stencil) RB checking. Noticed by Ken. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Remove exec thunks from the dlist.c module.Eric Anholt2013-01-211-870/+0
| | | | | | | | | | | | | | | | These were introduced in 2000 during a rework of the TNL module (commit cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290), though I'm having a hard time finding an instance there of one of these Exec functions being changed at runtime. Regardless, as far as I can tell now, these functions don't get changed, by grepping for calls to SET_* to change the dispatch table (we do change functions in GLvertexformat at runtime, but those don't overlap with this set of functions). Remove them and just let them be initialized to the same functions as are in the Exec table. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Initially populate the display list with the exec list.Eric Anholt2013-01-2111-284/+8
| | | | | | | | This cuts out a ton of code to make functions not set to a save_ variant match. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Delay display list save dispatch setup until Exec is set up.Eric Anholt2013-01-213-11/+8
| | | | | | | | This will let us copy from the Exec dispatch to deal with our commands that don't get compiled into display lists. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Make the drivers call a non-code-generated dispatch table setup.Eric Anholt2013-01-213-1/+10
| | | | | | | I want to drive the Save dispatch table setup from this same function. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Remove the size argument from _mesa_alloc_dispatch_table().Eric Anholt2013-01-213-8/+5
| | | | | | | | All callers are in Mesa core and all use _gloffset_COUNT, so just rely on the already baked-in use of _gloffset_COUNT in the function. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Remove two of the now unused ASSERT_OUTSIDE_BEGIN_END macros.Eric Anholt2013-01-211-25/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Drop manual checks for outside begin/end.Eric Anholt2013-01-2152-349/+92
| | | | | | | | | | | We now have a separate dispatch table for begin/end that prevent these functions from being entered during that time. The ASSERT_OUTSIDE_BEGIN_END_WITH_RETVALs are left because I don't want to change any return values or introduce new error-only stubs at this point. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Install a minimal dispatch table during glBegin()/glEnd().Eric Anholt2013-01-213-19/+116
| | | | | | | | | | This is a step toward getting rid of ASSERT_OUTSIDE_BEGIN_END() in Mesa. v2: Finish create_beginend_table() comment, move loopback API init into it, and add a const flag. (suggestions by Brian) Reviewed-by: Brian Paul <[email protected]> (v1) Reviewed-by: Ian Romanick <[email protected]> (v1)
* mesa: Remove the dead PrepareExecBegin() driver hook.Eric Anholt2013-01-211-8/+0
| | | | | | | This was used in i965 for a while, but no more. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Improve a glTexEnv error message by looking up the enum.Eric Anholt2013-01-211-1/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix regression in dlist save primitive tracking.Eric Anholt2013-01-211-8/+1
| | | | | | | | | | | | | My change 7ca4f07b5b77ccac0a9b60dc5ac9082906b5947e caused errors to not be thrown when they should, because the new if statement for ExecuteFlag made the CurrentSavePrimitive not get set. And on further review, we shouldn't be validating our primitive in GL_COMPILE mode, since the command shouldn't be executed yet. Partially fixes piglit gl-1.0-beginend-coverage. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* fbobject: add additional fbo completeness checks for GLESJordan Justen2013-01-201-1/+45
| | | | | Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* framebuffer: update allowed implementation format/typeJordan Justen2013-01-201-3/+23
| | | | | | | | Allow additional format/type combinations based on the color render buffer to fix failures with gles3-gtf. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* readpix: allow implementation format/typeJordan Justen2013-01-201-1/+6
| | | | | | | | | For GLES2/3 allow reading of pixels with format/type based on: * GL_IMPLEMENTATION_COLOR_READ_FORMAT * GL_IMPLEMENTATION_COLOR_READ_TYPE Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* extensions: enable EXT_color_buffer_float for ES3Jordan Justen2013-01-203-9/+20
| | | | | | | | | [mattst88] v2: Enable only for ES3 per spec. [mattst88] v3: Use _mesa_is_gles3 since EXT_color_buffer_float is ES3-only. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* extensions: Add ES3-only extension supportMatt Turner2013-01-201-5/+15
| | | | Reviewed-by: Ian Romanick <[email protected]>
* readpix: check FBO completeness before trying to access the read-bufferJordan Justen2013-01-201-9/+9
| | | | | Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* readpix: add error checking for GLES3Jordan Justen2013-01-201-0/+56
| | | | | Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* copyteximage: update error checking for GLES3Jordan Justen2013-01-201-1/+36
| | | | | | | Changes based on GTF/gles3 conformance test suite. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* copyteximage: check that sRGB usage is valid for GLES3 / GLJordan Justen2013-01-201-0/+39
| | | | | Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* mesa/es3: Allow unsized depth and depth-stencil formats in ES3Ian Romanick2013-01-201-2/+5
| | | | | | | | | They're part of GL_OES_depth_texture_cube_map, and we'll always enable that extension in ES3 contexts. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es2: Allow depth component cube maps in ES2 if the extension is enabledIan Romanick2013-01-201-1/+2
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add extension bit tracking for GL_OES_depth_texture_cube_mapIan Romanick2013-01-202-0/+2
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Array uniform name length includes length of [0]Ian Romanick2013-01-181-0/+10
| | | | | | | | | | | | | This is required by OpenGL ES 3.0 and desktop OpenGL 4.2. Previous version were ambiguous. This also matches the behavior of NVIDIA's closed-source driver (version 304.64). Fixed gles3conformance test uniform_buffer_object_getactiveuniformsiv and uniform_buffer_object_structure_and_array_element_names (on my in-progress branch that fixes a bunch of other stuff...YMMV). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Array uniform names are supposed to have [0] appendedIan Romanick2013-01-181-0/+31
| | | | | | | | | | | | | | | | This is required by OpenGL ES 3.0 and desktop OpenGL 4.2. Previous version were ambiguous. This also matches the behavior of NVIDIA's closed-source driver (version 304.64). Fixed gles3conformance test uniform_buffer_object_getactiveuniform. Several piglit tests expect glGetActiveUniform to *not* include the [0] on the end. These tests were already failing on NVIDIA, and this change regresses them on Mesa. Patches have been sent to the piglit mailing list to fix the tests. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Refactor getting a uniform's name to a helper functionIan Romanick2013-01-183-3/+16
| | | | | | | | We currently have a bug in this code, and I don't want to fix it in two places. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unused field gl_uniform_buffer_variable::BufferIan Romanick2013-01-181-1/+0
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Skip updating texgen when not doing fixed function.Eric Anholt2013-01-181-31/+39
| | | | | | | | | Between the previous commit and this one, improves GLBenchmark 2.1 offscreen performance by 0.48% +/- 0.24% (n=22, throttling outliers removed). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Don't bother updating ff texture state if we have a fragment shader.Eric Anholt2013-01-181-1/+2
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Drop a comment about ff vertex shading and texturing.Eric Anholt2013-01-181-5/+0
| | | | | | | It's never going to have texture fetches. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix out of bounds writes when uncompressing non-block-aligned ETC1.Eric Anholt2013-01-181-2/+2
| | | | | | Fixes a crash in GLB2.1 offscreen on the glthread branch. Reviewed-by: Kenneth Graunke <[email protected]>