summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* targets/omx: automake: link against libmesautil.laEmil Velikov2014-08-051-0/+1
| | | | | | | Or the build will fail due to unresolved symbols. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* targets/xvmc: automake: link against libmesautil.laEmil Velikov2014-08-051-0/+1
| | | | | | | Or the build will fail due to unresolved symbols. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* targets/clover: link against libmesautil.laJan Vesely2014-08-051-0/+1
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-and-Tested-by: Michel Dänzer <[email protected]>
* gallivm: Fix build with latest LLVMJan Vesely2014-08-051-0/+8
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-and-Tested-by: Michel Dänzer <[email protected]>
* targets/dri: link with mesautilRoland Scheidegger2014-08-051-0/+1
| | | | | | Similar to other recent build fixes. Reviewed-by: Emil Velikov <[email protected]>
* gallium/docs: Document TEX2/TXL2/TXB2 instructions and fix up other tex docRoland Scheidegger2014-08-051-25/+102
| | | | | | | | Add documentation for TEX2/TXL2/TXB2 tgsi opcodes. Also, the texture opcode documentation wasn't very accurate so fix this up a bit. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallivm: fix cube map array (and cube map shadow with bias) handlingRoland Scheidegger2014-08-052-29/+125
| | | | | | | | | | | In particular need to handle TEX2/TXB2/TXL2 opcodes. cube map shadow with bias already used TXB2 which didn't work before at all, despite that there's by default no piglit change (but using no_quad_lod and no_rho_opt indeed passes some more tex-miplevel-selection tests). The actual sampling code still won't handle cube map arrays. Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: implement support for cube map arraysRoland Scheidegger2014-08-055-4/+16
| | | | | | | | This just covers the resource side of things, not the actual sampling. Here things are trivial as cube map arrays are identical to 2d arrays in all respects. Reviewed-by: Brian Paul <[email protected]>
* egl: Fix OpenGL ES version checks in _eglParseContextAttribList()Anuj Phogat2014-08-041-1/+4
| | | | | | | | | | | | | | | | | | | | We would generate EGL_BAD_CONFIG because _eglGetContextAPIBit returns zero for the combination of EGL_OPENGL_ES_API and a major version > 3. By just returning zero, the caller can't tell the difference between a bad version (which should generate EGL_BAD_MATCH) and a bad API (which should generate EGL_BAD_CONFIG). This patch causes us to filter out major versions > 3 at a point where we can generate the correct error. Fixes gles3 Khronos CTS test: egl_create_context.egl_create_context V2: Fix commit message as suggested by Ian. Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* meta: Fix datatype computation in get_temp_image_type()Anuj Phogat2014-08-041-5/+4
| | | | | | | | | | | | | | Changes in the patch will cause datatype to be computed correctly for 8 and 16 bit integer formats. For example: GL_RG8I, GL_RG16I etc. Fixes many failures in gles3 Khronos CTS test: copy_tex_image_conversions_required copy_tex_image_conversions_forbidden Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Move the call to _mesa_get_format_datatype() out of switchAnuj Phogat2014-08-041-7/+3
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Use _mesa_get_format_bits() to get the GL_RED_BITSAnuj Phogat2014-08-041-2/+3
| | | | | | | | | | | | | We currently get red bits from ctx->DrawBuffer->Visual.redBits by making a false assumption that the texture we're writing to (in glCopyTexImage2D()) is used as a DrawBuffer. Fixes many failures in gles3 Khronos CTS test: copy_tex_image_conversions_required Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Initialize the variable in declaration statementAnuj Phogat2014-08-041-3/+1
| | | | | | | Saves one line of code :) Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* mesa: Allow GL_TEXTURE_CUBE_MAP target with compressed internal formatsAnuj Phogat2014-08-041-0/+1
| | | | | | | | | GL_TEXTURE_CUBE_MAP is an allowed texture target in glTexStorage2D() and is allowed to be used (like GL_TEXTURE_2D) with compressed internal formats. Cc: <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Add gles3 condition for normalized internal formats in glCopyTexImage*()Anuj Phogat2014-08-041-0/+15
| | | | | | | | Fixes many failures in gles3 Khronos CTS test: packed_pixels Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add utility function _mesa_is_enum_format_unorm()Anuj Phogat2014-08-042-0/+74
| | | | | | | | V2: Add missing formats. Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add gles3 error condition for GL_RGBA10_A2 buffer format in ↵Anuj Phogat2014-08-041-18/+29
| | | | | | | | | | | glCopyTexImage*() Fixes many failures in gles3 Khronos CTS test: packed_pixels Khronos bug# 9807 Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add a gles3 error condition for sized internalformat in glCopyTexImage*()Anuj Phogat2014-08-041-0/+46
| | | | | | | | | | Fixes many failures in gles3 Khronos CTS test: packed_pixels V2: Add the check for alpha bits to avoid confusion. Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add a helper function _mesa_is_enum_format_unsized()Anuj Phogat2014-08-042-0/+59
| | | | | | | | | | Function is utilized by next patch in the series. V2: Add missing formats. Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Don't allow snorm internal formats in glCopyTexImage*() in GLES3Anuj Phogat2014-08-041-0/+11
| | | | | | | | Fixes few failures in gles3 Khronos CTS test: packed_pixels Cc: "10.2" <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add utility function _mesa_is_enum_format_snorm()Anuj Phogat2014-08-042-0/+40
| | | | | | Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Fix condition for using compressed internalformat in ↵Anuj Phogat2014-08-041-1/+8
| | | | | | | | glCompressedTexImage3D() Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add error condition for using compressed internalformat in ↵Anuj Phogat2014-08-041-0/+18
| | | | | | | | | | glTexStorage3D() Fixes gles3 Khronos CTS test: texture_storage_texture_internal_formats Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Turn target_can_be_compressed() in to a utility functionAnuj Phogat2014-08-042-6/+9
| | | | | | | | V2: Declare the function in teximage.h Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Fix error condition for valid texture targets in glTexStorage* functionsAnuj Phogat2014-08-041-0/+7
| | | | | | | | Fixes gles3 Khronos CTS test: texture_storage_texture_targets Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Rebuild the symbol table without unreachable symbolsIan Romanick2014-08-041-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we had to keep unreachable global symbols in the symbol table because the symbol table is used during linking. Having the symbol table retain pointers to freed memory... what could possibly go wrong? At the same time, this meant that we kept live references to tons of memory that was no longer needed. New strategy: destroy the old symbol table, and make a new one from the reachable symbols. Valgrind massif results for a trimmed apitrace of dota2: n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) Before (32-bit): 59 40,642,425,451 76,337,968 69,720,886 6,617,082 0 After (32-bit): 46 40,661,487,174 75,116,800 68,854,065 6,262,735 0 Before (64-bit): 79 37,179,441,771 106,986,512 98,112,095 8,874,417 0 After (64-bit): 64 37,200,329,700 104,872,672 96,514,546 8,358,126 0 A real savings of 846KiB on 32-bit and 1.5MiB on 64-bit. v2: (by Kenneth Graunke) Just add the ir_function from the IR stream, rather than looking it up in the symbol table; they're now identical. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Only create one ir_function for a given name.Kenneth Graunke2014-08-041-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Piglit's spec/glsl-1.10/linker/override-builtin-{const,uniform}-05 tests do the following: 1. Call abs(float) - a built-in function. 2. Create a user-defined replacement for abs(float). 3. Call abs(float) again - now the user function. At step 1, we created an ir_function which included the built-in signature, added it to the symbol table, and emitted it into the IR stream. Then, when processing the function definition at step 2, we'd see that there was already an ir_function. But, since there were no user-defined functions, we skipped over a bunch of code, and ended up creating a second one. This new ir_function shadowed the original in the symbol table, but both ended up in the IR stream. This results in an awkward situation where searching for an ir_function via the symbol table, a forward linked list walk, and a reverse linked list walk may return different ir_functions. This seems undesirable. This patch instead re-uses the existing ir_function, putting both built-in and user-defined signatures in the same one. The previous patch's additional filtering ensures everything continues working. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Make it possible to ignore built-ins when matching signatures.Kenneth Graunke2014-08-0412-20/+30
| | | | | | | | | | | | | | | | | | Historically, we've implemented the rules for overriding built-in functions by creating multiple ir_functions and relying on the symbol table to hide the one containing built-in functions. That works, but has a few drawbacks, so the next patch will change it. Instead, we'll have a single ir_function for a particular name, which will contain both built-in and user-defined signatures. Passing an extra parameter to matching_signature makes it easy to ignore built-ins when they're supposed to be hidden. I didn't add the parameter to exact_matching_signature since it wasn't necessary. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Actually use the Mesa IR optimizer for ARB programs.Kenneth Graunke2014-08-041-0/+7
| | | | | | | | | | | | On Haswell, this cuts 1-3 instructions from 183 vertex shaders in "Shadowrun Returns", "Shatter", and "Trine 2." It adds 2 instructions to a single fragment shader in "Closure." total instructions in shared programs: 278803 -> 278546 (-0.09%) instructions in affected programs: 41930 -> 41673 (-0.61%) Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Do not add extra padding to structuresIan Romanick2014-08-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This code was attemping to align the base of the structure to the required alignment of the structure. However, it had two problems: 1. It was aligning the target structure member, not the base of the structure. 2. It was calculating the alignment based on the members previous to the target member instead of all the members of the structure. Fixes gles3conform failures in: ES3-CTS.shaders.uniform_block.random.nested_structs.6 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays_instance_arrays.2 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays_instance_arrays.6 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.5 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.19 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.0 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.2 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.6 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.12 v2: Fix rebase failure noticed by Matt. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Correctly determine when the field of a UBO is row-majorIan Romanick2014-08-041-15/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if a field of an block with an instance name was marked row-major (but block itself was not), we would think the field (and it's sub-fields) were column-major. Fixes gles3conform failures in: ES3-CTS.shaders.uniform_block.random.basic_types.7 ES3-CTS.shaders.uniform_block.random.basic_types.9 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.1 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.3 ES3-CTS.shaders.uniform_block.random.nested_structs.3 ES3-CTS.shaders.uniform_block.random.nested_structs.5 ES3-CTS.shaders.uniform_block.random.nested_structs.8 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays.3 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays.6 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays.7 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays.8 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays.9 ES3-CTS.shaders.uniform_block.random.nested_structs_instance_arrays.0 ES3-CTS.shaders.uniform_block.random.nested_structs_instance_arrays.1 ES3-CTS.shaders.uniform_block.random.nested_structs_instance_arrays.2 ES3-CTS.shaders.uniform_block.random.nested_structs_instance_arrays.3 ES3-CTS.shaders.uniform_block.random.nested_structs_instance_arrays.4 ES3-CTS.shaders.uniform_block.random.nested_structs_instance_arrays.6 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays_instance_arrays.0 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays_instance_arrays.1 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays_instance_arrays.5 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.0 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.4 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.7 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.8 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.12 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.14 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.15 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.16 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.1 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.8 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.9 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.10 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.11 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.13 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.14 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.15 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.16 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.17 Fixes gles3conform failures (caused by previous commits) in: ES3-CTS.shaders.uniform_block.random.basic_types.8 ES3-CTS.shaders.uniform_block.random.basic_arrays.3 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.0 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.2 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.9 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.13 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.18 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.4 v2: Fix rebase failure noticed by Matt. v3: Use without_array() instead of older predicates. v4: s/GLSL_MATRIX_LAYOUT_DEFAULT/GLSL_MATRIX_LAYOUT_INHERITED/g Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> [v2]
* linker: Use the matrix layout information in ir_variable and glsl_type for ↵Ian Romanick2014-08-041-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UBO layout Use the data that is stored in the ir_variable and the glsl_type to determine whether or not a UBO member is row-major. Fixes gles3conform failures in: ES3-CTS.shaders.uniform_block.instance_array_basic_type.shared.row_major_mat2 ES3-CTS.shaders.uniform_block.instance_array_basic_type.shared.row_major_mat3 ES3-CTS.shaders.uniform_block.instance_array_basic_type.shared.row_major_mat4 ES3-CTS.shaders.uniform_block.instance_array_basic_type.shared.row_major_mat2x3 ES3-CTS.shaders.uniform_block.instance_array_basic_type.shared.row_major_mat2x4 ES3-CTS.shaders.uniform_block.instance_array_basic_type.shared.row_major_mat3x2 ES3-CTS.shaders.uniform_block.instance_array_basic_type.shared.row_major_mat3x4 ES3-CTS.shaders.uniform_block.instance_array_basic_type.shared.row_major_mat4x2 ES3-CTS.shaders.uniform_block.instance_array_basic_type.shared.row_major_mat4x3 ES3-CTS.shaders.uniform_block.instance_array_basic_type.packed.row_major_mat2 ES3-CTS.shaders.uniform_block.instance_array_basic_type.packed.row_major_mat3 ES3-CTS.shaders.uniform_block.instance_array_basic_type.packed.row_major_mat4 ES3-CTS.shaders.uniform_block.instance_array_basic_type.packed.row_major_mat2x3 ES3-CTS.shaders.uniform_block.instance_array_basic_type.packed.row_major_mat2x4 ES3-CTS.shaders.uniform_block.instance_array_basic_type.packed.row_major_mat3x2 ES3-CTS.shaders.uniform_block.instance_array_basic_type.packed.row_major_mat3x4 ES3-CTS.shaders.uniform_block.instance_array_basic_type.packed.row_major_mat4x2 ES3-CTS.shaders.uniform_block.instance_array_basic_type.packed.row_major_mat4x3 ES3-CTS.shaders.uniform_block.instance_array_basic_type.std140.row_major_mat2 ES3-CTS.shaders.uniform_block.instance_array_basic_type.std140.row_major_mat3 ES3-CTS.shaders.uniform_block.instance_array_basic_type.std140.row_major_mat4 ES3-CTS.shaders.uniform_block.instance_array_basic_type.std140.row_major_mat2x3 ES3-CTS.shaders.uniform_block.instance_array_basic_type.std140.row_major_mat2x4 ES3-CTS.shaders.uniform_block.instance_array_basic_type.std140.row_major_mat3x2 ES3-CTS.shaders.uniform_block.instance_array_basic_type.std140.row_major_mat3x4 ES3-CTS.shaders.uniform_block.instance_array_basic_type.std140.row_major_mat4x2 ES3-CTS.shaders.uniform_block.instance_array_basic_type.std140.row_major_mat4x3 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays.2 ES3-CTS.shaders.uniform_block.random.nested_structs_instance_arrays.5 ES3-CTS.shaders.uniform_block.random.nested_structs_instance_arrays.9 Causes gles3conform failures in: ES3-CTS.shaders.uniform_block.random.basic_types.8 ES3-CTS.shaders.uniform_block.random.basic_arrays.3 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.0 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.2 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.13 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.18 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.4 These failures will be fixed shortly. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Track matrix layout of variables using two bitsIan Romanick2014-08-044-15/+61
| | | | | | | | | | | | | | | | | | | | Fixes gles3conform failures in: ES3-CTS.shaders.uniform_block.random.nested_structs_arrays_instance_arrays.3 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.13 Causes gles3conform failures in: ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.9 This failure will be fixed shortly. v2: Use without_array() instead of older predicates. v3: s/GLSL_MATRIX_LAYOUT_DEFAULT/GLSL_MATRIX_LAYOUT_INHERITED/g Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> [v1]
* glsl: Also track matrix layout information into structuresIan Romanick2014-08-041-1/+7
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Track matrix layout of structure fields using two bitsIan Romanick2014-08-046-50/+96
| | | | | | | | | v2: Rename GLSL_MATRIX_LAYOUT_DEFAULT to GLSL_MATRIX_LAYOUT_INHERITED. Add comments in glsl_types.h explaining the layouts. Suggested by Matt. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Correctly load columns of a row-major matrixIan Romanick2014-08-041-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a row-major matrix, the next column starts at the next element. Fixes gles3conform failures in: ES3-CTS.shaders.uniform_block.single_basic_array.shared.row_major_mat2 ES3-CTS.shaders.uniform_block.single_basic_array.shared.row_major_mat3 ES3-CTS.shaders.uniform_block.single_basic_array.shared.row_major_mat4 ES3-CTS.shaders.uniform_block.single_basic_array.shared.row_major_mat2x3 ES3-CTS.shaders.uniform_block.single_basic_array.shared.row_major_mat2x4 ES3-CTS.shaders.uniform_block.single_basic_array.shared.row_major_mat3x2 ES3-CTS.shaders.uniform_block.single_basic_array.shared.row_major_mat3x4 ES3-CTS.shaders.uniform_block.single_basic_array.shared.row_major_mat4x2 ES3-CTS.shaders.uniform_block.single_basic_array.shared.row_major_mat4x3 ES3-CTS.shaders.uniform_block.single_basic_array.packed.row_major_mat2 ES3-CTS.shaders.uniform_block.single_basic_array.packed.row_major_mat3 ES3-CTS.shaders.uniform_block.single_basic_array.packed.row_major_mat4 ES3-CTS.shaders.uniform_block.single_basic_array.packed.row_major_mat2x3 ES3-CTS.shaders.uniform_block.single_basic_array.packed.row_major_mat2x4 ES3-CTS.shaders.uniform_block.single_basic_array.packed.row_major_mat3x2 ES3-CTS.shaders.uniform_block.single_basic_array.packed.row_major_mat3x4 ES3-CTS.shaders.uniform_block.single_basic_array.packed.row_major_mat4x2 ES3-CTS.shaders.uniform_block.single_basic_array.packed.row_major_mat4x3 ES3-CTS.shaders.uniform_block.single_basic_array.std140.row_major_mat2 ES3-CTS.shaders.uniform_block.single_basic_array.std140.row_major_mat3 ES3-CTS.shaders.uniform_block.single_basic_array.std140.row_major_mat4 ES3-CTS.shaders.uniform_block.single_basic_array.std140.row_major_mat2x3 ES3-CTS.shaders.uniform_block.single_basic_array.std140.row_major_mat2x4 ES3-CTS.shaders.uniform_block.single_basic_array.std140.row_major_mat3x2 ES3-CTS.shaders.uniform_block.single_basic_array.std140.row_major_mat3x4 ES3-CTS.shaders.uniform_block.single_basic_array.std140.row_major_mat4x2 ES3-CTS.shaders.uniform_block.single_basic_array.std140.row_major_mat4x3 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.9 Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* linker: Add padding after the last field of a structureIan Romanick2014-08-043-3/+25
| | | | | | | | | | | | This causes the thing following the structure to be vec4-aligned. Fixes gles3conform failures in: ES3-CTS.shaders.uniform_block.random.nested_structs.2 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.5 Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* linker: Add a last_field parameter to various program_resource_visitor methodsIan Romanick2014-08-043-16/+30
| | | | | | | | | I also considered renaming visit_field(const glsl_struct_field *) to entry_record and adding an exit_record method. This would be more similar to the hierarchical visitor. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: Do not list inactive block members as activeIan Romanick2014-08-041-6/+26
| | | | | | | | | | | | | | | | Fixes gles3conform failures in: ES3-CTS.shaders.uniform_block.single_nested_struct.per_block_buffer_packed ES3-CTS.shaders.uniform_block.single_nested_struct_array.per_block_buffer_packed ES3-CTS.shaders.uniform_block.random.scalar_types.7 ES3-CTS.shaders.uniform_block.random.basic_arrays.4 ES3-CTS.shaders.uniform_block.random.basic_arrays.6 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.2 ES3-CTS.shaders.uniform_block.random.nested_structs.9 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.3 Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Do not eliminate 'shared' or 'std140' blocks or block membersIan Romanick2014-08-043-4/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 32f32292 (glsl: Allow elimination of uniform block members) enabled elimination of unused uniform block members to fix a gles3 conformance test failure. This went too far the other way. Section 2.11.6 (Uniform Variables) of the OpenGL ES 3.0.3 spec says: "All members of a named uniform block declared with a shared or std140 layout qualifier are considered active, even if they are not referenced in any shader in the program. The uniform block itself is also considered active, even if no member of the block is referenced." Fixes gles3conform failures in: ES3-CTS.shaders.uniform_block.single_nested_struct.per_block_buffer_shared ES3-CTS.shaders.uniform_block.single_nested_struct.per_block_buffer_std140 ES3-CTS.shaders.uniform_block.single_nested_struct_array.per_block_buffer_shared ES3-CTS.shaders.uniform_block.single_nested_struct_array.per_block_buffer_std140 ES3-CTS.shaders.uniform_block.random.scalar_types.2 ES3-CTS.shaders.uniform_block.random.scalar_types.9 ES3-CTS.shaders.uniform_block.random.vector_types.1 ES3-CTS.shaders.uniform_block.random.vector_types.3 ES3-CTS.shaders.uniform_block.random.vector_types.7 ES3-CTS.shaders.uniform_block.random.vector_types.9 ES3-CTS.shaders.uniform_block.random.basic_types.5 ES3-CTS.shaders.uniform_block.random.basic_types.6 ES3-CTS.shaders.uniform_block.random.basic_arrays.0 ES3-CTS.shaders.uniform_block.random.basic_arrays.2 ES3-CTS.shaders.uniform_block.random.basic_arrays.5 ES3-CTS.shaders.uniform_block.random.basic_arrays.8 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.0 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.4 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.5 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.6 ES3-CTS.shaders.uniform_block.random.basic_instance_arrays.9 ES3-CTS.shaders.uniform_block.random.nested_structs.0 ES3-CTS.shaders.uniform_block.random.nested_structs.1 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays.4 ES3-CTS.shaders.uniform_block.random.nested_structs_instance_arrays.8 ES3-CTS.shaders.uniform_block.random.nested_structs_arrays_instance_arrays.7 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.3 ES3-CTS.shaders.uniform_block.random.all_per_block_buffers.6 ES3-CTS.shaders.uniform_block.random.all_shared_buffer.18 v2: Whitespace and other minor fixes suggested by Matt. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Use the without_array predicate to simplify some codeIan Romanick2014-08-044-23/+12
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> [v1] Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Add without_array type predicateIan Romanick2014-08-041-0/+12
| | | | | | | | | | | Returns the type without any arrays. This will be used in later patches in this series. Signed-off-by: Ian Romanick <[email protected]> Suggested-by: Timothy Arceri <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Use constant_expression_value instead of as_constantIan Romanick2014-08-041-1/+2
| | | | | | | | | Just a few lines earlier we may have wrapped the index expression with ir_unop_i2u expression. Whenever that happens, as_constant will return NULL, and that almost always happens. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* targets/graw-gdi: link with mesautil, not mesautilsBrian Paul2014-08-041-1/+1
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* wmesa: link with mesautilBrian Paul2014-08-041-0/+2
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* osmesa: link with mesautilBrian Paul2014-08-041-0/+1
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* targets/libgl-gdi: link with mesautilBrian Paul2014-08-041-0/+3
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* targets/egl-static: link with libmesautil.laBrian Paul2014-08-041-0/+1
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* mesa/x86: put code in braces to silence declarations after code warningBrian Paul2014-08-041-7/+9
| | | | Reviewed-by: Matt Turner <[email protected]>
* src/Makefile.am: Move gtest before utilJason Ekstrand2014-08-041-1/+1
| | | | | | | | Since the ralloc test in util/tests needs gtest, we need to make sure that the gtest subdir is loaded first. This fixes bug #82148. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Brian Paul <[email protected]>