summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: add new glsl_strtof() functionBrian Paul2013-01-252-0/+25
| | | | | | | Note, we could alternately implement this in terms of glsl_strtod() with a (float) cast. Reviewed-by: Ian Romanick <[email protected]>
* softpipe: add casts to silence MSVC warningsBrian Paul2013-01-251-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC signed/unsigned comparison warningsBrian Paul2013-01-251-4/+4
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC double->float conversion warningsBrian Paul2013-01-251-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC signed/unsigned warnings in debug_get_flags_option()Brian Paul2013-01-251-1/+1
| | | | Reviewed-by: José Fonseca <[email protected]>
* st/mesa: silence assorted MSVC warnings in DrawPixels codeBrian Paul2013-01-251-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* swrast: silence a bunch of MSVC warningsBrian Paul2013-01-251-19/+19
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: use GLbitfield64 when copying program inputsBrian Paul2013-01-251-2/+2
| | | | | | Note: This is a candidate for the 9.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: add some casts to silence MSVC warningsBrian Paul2013-01-251-14/+14
| | | | Reviewed-by: José Fonseca <[email protected]>
* 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]>
* i965: Enable ARB_shading_language_packingMatt Turner2013-01-251-0/+1
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965: Assert that the 4x8 pack/unpack operations have been loweredMatt Turner2013-01-253-0/+12
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965: Lower the 4x8 pack/unpack operationsMatt Turner2013-01-251-1/+5
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Add support for lowering 4x8 pack/unpack operationsMatt Turner2013-01-252-0/+285
| | | | | | | Lower them to arithmetic and bit manipulation expressions. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Evaluate constant pack/unpack 4x8 expressionsMatt Turner2013-01-251-0/+166
| | | | | | | | | That is, evaluate constant expressions for the following functions: packSnorm4x8, unpackSnorm4x8 packUnorm4x8, unpackUnorm4x8 Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Extend ir_expression_operation for ARB_shading_language_packingMatt Turner2013-01-254-0/+31
| | | | | | | | | For each function {pack,unpack}{Snorm,Unorm}4x8, add a corresponding opcode to enum ir_expression_operation. Validate the new opcodes in ir_validate.cpp. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Add IR lisp for ARB_shading_language_packingMatt Turner2013-01-255-0/+38
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Add infrastructure for ARB_shading_language_packingMatt Turner2013-01-257-0/+10
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* configure.ac: Don't set LLVM_LIBS when llvm is disabledTom Stellard2013-01-251-16/+19
|
* r600g: Don't build llvm_wrapper.cpp when we aren't using LLVMTom Stellard2013-01-251-1/+3
| | | | | | | | | | | | | | | | | | We were using the NEED_RADEON_GALLIUM conditional to decide whether or not to build llvm_wrapper.cpp, which is required for using the LLVM backend. llvm_wrapper.cpp needs to be linked against the LLVM IPO libary and this library is only added to LLVM_LIBS if either opencl or the r600-llvm-compiler is enabled. The NEED_RADEON_GALLIUM conditional is set to true when enabling the radeonsi driver, so if the radeonsi and r600 drivers are enabled without also enabling opencl or r600-llvm-compiler, llvm_wrapper.cpp will be built, but the IPO library won't be added to LLVM_LIBS. This was causing unresolved symbol errors when buiding with this configuration. https://bugs.freedesktop.org/show_bug.cgi?id=59831 Tested-by: Alex Deucher <[email protected]>
* i965: Pass in the glarray to get_surface_type.Eric Anholt2013-01-251-29/+22
| | | | | | | Dereffing all the values in the two callers was just pointless, and the function isn't inlined so there was actual code impact. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove nonsense comment.Eric Anholt2013-01-251-2/+0
| | | | | | vb.inputs_read has never been a thing, even in the initial import. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove NDEBUG undef that was snuck in.Eric Anholt2013-01-251-2/+0
| | | | | | If you want debug, set --enable-debug in your config flags. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: reuse _mesa_sizeof_type for index buffer types.Eric Anholt2013-01-251-24/+2
| | | | | | | The core Mesa code has just one more case than this (GL_BITMAP), so I don't see any cause to special-case it. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Reuse precalculated ib_type_size value.Eric Anholt2013-01-251-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Drop debug check for knowing the size of a type.Eric Anholt2013-01-251-2/+1
| | | | | | | | This was added in b93684f5f311f89c965960ab42bfea71a397b180, but there's no need for it -- get_size has to succeed, and it has an assert for us in debug builds. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Stop worrying about alignment of vertex data.Eric Anholt2013-01-251-7/+1
| | | | | | | | | For our current types, the required alignment is actually just 1 byte. When we get doubles, we have to worry (those have to be aligned to the natural size), but we don't have doubles yet and they'll just be a special case. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Use the glarray _ElementSize that Mesa tracks for us.Eric Anholt2013-01-252-8/+4
| | | | Reviewed-by: Kenneth Graunke <[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: Remove ir_variable::uniform_blockIan Romanick2013-01-255-14/+0
| | | | | | | | | v2: A previous patch contained a spurious hunk that removed an assignment to ir_variable::uniform_block. That hunk was moved to this patch. Suggested by Carl Worth. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Allow dereferencing fields of an interface instanceIan Romanick2013-01-251-1/+2
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Allow elimination of uniform block membersIan Romanick2013-01-251-6/+1
| | | | | | | | | | | | | | | | | | | glGetActiveUniform is not supposed to report block members that are not active even if they are included in the layout of the block. The block layout is determined from the GLSL_TYPE_INTERFACE that defines the block, so eliminating the ir_variables that correspond to the individual fields is safe. Fixes gles3conform test uniform_buffer_object_getuniformindices_for_for_nonexistent_or_not_active_uniform_names. This also fixes the assertion failures (added in the previous commit) in gles3conform uniform_buffer_object_index_of_not_active_block, uniform_buffer_object_inherit_and_override_layouts, and uniform_buffer_object_repeat_global_scope_layouts. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Calculate UBO data at link-timeIan Romanick2013-01-253-77/+44
| | | | | | | | | | | | | Use the function added in the previous commit. This temporarily causes gles3conform uniform_buffer_object_index_of_not_active_block, uniform_buffer_object_inherit_and_override_layouts, and uniform_buffer_object_repeat_global_scope_layouts to assertion fail. This is fixed in the next commit. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Add link_uniform_blocks to calculate all UBO data at link-timeIan Romanick2013-01-252-0/+255
| | | | | | | | Calculate all of the block member offsets, the IndexNames, and everything else to do with every UBO. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Add a visitor to determine whether a uniform block is ever usedIan Romanick2013-01-253-0/+225
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Lower UBO references using link-time data instead of compile-time dataIan Romanick2013-01-251-3/+86
| | | | | | | | Pretty much all of the compile-time, per-compilation unit block data is about to get the axe. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Add gl_uniform_buffer_variable::IndexName fieldIan Romanick2013-01-254-2/+22
| | | | | | | | | | | | | 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]>
* glsl: Make the align function available elsewhere in the linkerIan Romanick2013-01-254-31/+20
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]>
* glsl: Calculate link-time uniform block data without using compile-time ↵Ian Romanick2013-01-251-24/+54
| | | | | | | | | | block data Pretty much all of the compile-time, per-compilation unit block data is about to get the axe. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Assert that interfaces, like structures, are not seen as leaf typesIan Romanick2013-01-251-0/+4
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add new uniform_field_visitor::process variantIan Romanick2013-01-252-0/+39
| | | | | | | | | | This flavor takes a type and a base name. It will be used to handle cases where the block name (instead of the instance name) is used for an interface block. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Recurse into uniform blocks just like uniform structuresIan Romanick2013-01-251-4/+20
| | | | | | | | v2: Inspite of the spell checker, spell recurse correctly. Suggested by Carl Worth. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Handle instance array declarationsIan Romanick2013-01-251-3/+19
| | | | | | | | | v2: Add a comment and an assertion about the array size in the non-instance name case. Suggested by Paul Berry. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Track blocks in the symbol table using the glsl_type instead of the ↵Ian Romanick2013-01-253-18/+9
| | | | | | | | | | | | | gl_uniform_block Eventually the gl_uniform_block information won't be calculated until linking. Block names need to be checked for name clashes during compiling, so we have to track it differently. v2: Update the commit message. Suggested by Carl Worth. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add new uniform_field_visitor::visit_field variantIan Romanick2013-01-252-0/+17
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Modify uniform_field_visitor::visit_field to take a row_major parameterIan Romanick2013-01-253-7/+19
| | | | | | | | | | Not used yet, but the UBO layout visitor will use this. v2: Remove a spruious hunk. This is moved to the patch "glsl: Remove ir_variable::uniform_block". Suggested by Carl Worth. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Modify uniform_field_visitor::recursion to take a row_major parameterIan Romanick2013-01-252-5/+19
| | | | | | | | | | | Not used yet, but the UBO layout visitor will use this. v2: Add some commentary as to why row_major is always set to false in process. Suggesed by Paul Berry. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add a predicate to determine whether a variable is an interface blockIan Romanick2013-01-251-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | For the first declaration below, there will be an ir_variable named "instance" whose type and whose instance_type will be the same glsl_type. For the second declaration, there will be an ir_variable named "f" whose type is float and whose instance_type is B2. "instance" is an interface instance variable, but "f" is not. uniform B1 { float f; } instance; uniform B2 { float f; }; v2: Copy the comment message documentation into the code. Suggested by Paul Berry. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Require that indices into uniform block arrays be constantsIan Romanick2013-01-251-0/+9
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add ir_variable::interface_type fieldIan Romanick2013-01-253-1/+13
| | | | | | | | | | | | | | | For variables that are in an interface block or are an instance of an interface block, this is the GLSL_TYPE_INTERFACE type for that block. Convert the ir_variable::is_in_uniform_block method added in the previous commit to use this field instead of ir_variable::uniform_block. v2: Fix the place-holder comment on ir_variable::interface_type. Suggested by Paul Berry. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>