summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* util: Move gallium's linked list to utilJason Ekstrand2015-05-0844-55/+50
| | | | | | | | | The linked list in gallium is pretty much the kernel list and we would like to have a C-based linked list for all of mesa. Let's not duplicate and just steal the gallium one. Acked-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* gallium/double_list: s/INLINE/inline and remove the p_compiler includeJason Ekstrand2015-05-081-7/+6
| | | | | Acked-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* nir: Use nir_instr_rewrite_src in copy propagationJason Ekstrand2015-05-081-61/+10
| | | | | | | We were rolling our own rewrite_src variant in copy-propagation. Let's stop doing that and use the ones in core NIR. Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a function for rewriting the condition of an if statementJason Ekstrand2015-05-082-0/+23
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add and use initializer #defines for nir_src and nir_destJason Ekstrand2015-05-086-18/+15
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Modernize the out-of-SSA passJason Ekstrand2015-05-081-103/+36
| | | | | | | | | The out-of-SSA pass was one of the first passes written when getting SSA up-and-going (for obvious reasons). As such, it came before a lot of the nifty SSA-based helpers were introduced. This commit modernizes it so that we're no longer doing nearly as much manual banging on use/def sets. Reviewed-by: Connor Abbott <[email protected]>
* nir/validate: Validate SSA def parent instructionsJason Ekstrand2015-05-081-0/+2
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nv50/ir: only propagate saturate up if some actual folding took placeIlia Mirkin2015-05-081-1/+2
| | | | | | | | | | The former logic would copy the saturate up to any mul with an immediate if there was a subsequent mul with a saturate. However we only want to do that if we collapsed 2 muls by multiplying their immediates (or were able to put the immediate in as a post-multiplier). Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nir: Delete all traces of nir_op_flogIan Romanick2015-05-083-10/+0
| | | | | | | | Nothing produces it, and nothing can consume it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir: Don't produce nir_op_flog from GLSL IRIan Romanick2015-05-081-1/+1
| | | | | | | | | All paths that produce GLSL IR for NIR lower ir_unop_log. All paths that consume NIR will explode if they geta nir_op_flog. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir: Delete all traces of nir_op_fexpIan Romanick2015-05-083-9/+0
| | | | | | | | Nothing produces it, and nothing can consume it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir: Don't produce nir_op_fexp from GLSL IRIan Romanick2015-05-081-1/+1
| | | | | | | | | All paths that produce GLSL IR for NIR lower ir_unop_exp. All paths that consume NIR will explode if they geta nir_op_fexp. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* prog_to_nir: OPCODE_EXP is not nir_op_fexpIan Romanick2015-05-081-1/+1
| | | | | | | | | It's a weird thing that provides some values related to 2**x. It's also already handled by a case in the switch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* i965/fs: Improve a comment about stripping trailing zeroesNeil Roberts2015-05-081-3/+6
| | | | | | Originally I wrote that removing the first parameter doesn't work but I didn't know why. I now found a mention of this in the PRM so it's probably worthing adding it to the comment.
* mesa: Implement GetVertexArrayIndexed[64]ivFredrik Höglund2015-05-084-0/+143
| | | | | | v2: Fix the name of the entry point in the error messages. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add support for querying GL_VERTEX_ATTRIB_ARRAY_LONGFredrik Höglund2015-05-081-0/+5
| | | | | | This parameter was added in OpenGL 4.3 and GL_ARB_direct_state_access. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to get_vertex_array_attribFredrik Höglund2015-05-081-9/+16
| | | | | | | | | This is needed to implement glGetVertexArrayIndexediv and glGetVertexArrayIndexed64iv. v2: Make the vao parameter const. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement GetVertexArrayivFredrik Höglund2015-05-084-0/+43
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayBindingDivisorFredrik Höglund2015-05-084-16/+58
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to vertex_binding_divisorFredrik Höglund2015-05-081-4/+6
| | | | | | This is needed to implement VertexArrayBindingDivisor. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayAttribBindingFredrik Höglund2015-05-084-22/+66
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to vertex_attrib_bindingFredrik Höglund2015-05-081-6/+9
| | | | | | This is needed to implement VertexArrayAttribBinding. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayAttrib[I|L]FormatFredrik Höglund2015-05-084-0/+122
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to update_array_formatFredrik Höglund2015-05-081-7/+10
| | | | | | This is needed to implement VertexArrayAttrib*Format. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Refactor VertexAttrib[I|L]FormatFredrik Höglund2015-05-081-100/+49
| | | | | | | | The only difference between these functions is the legal types and sizes, so consolidate the code into a single vertex_attrib_format() function and call it from all three entry points. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayVertexBuffersFredrik Höglund2015-05-084-27/+78
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayVertexBufferFredrik Höglund2015-05-084-25/+71
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to bind_vertex_bufferFredrik Höglund2015-05-081-8/+10
| | | | | | | This is needed to implement VertexArrayVertexBuffer and VertexArrayVertexBuffers. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayElementBufferFredrik Höglund2015-05-084-0/+49
| | | | | | v2: Add a doxygen comment. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement EnableVertexArrayAttribFredrik Höglund2015-05-084-9/+47
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement DisableVertexArrayAttribFredrik Höglund2015-05-084-9/+46
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Keep track of the last looked-up VAOFredrik Höglund2015-05-082-13/+27
| | | | | | | | | | | | | | | This saves the cost of repeated hash table lookups when the same vertex array object is referenced in a sequence of calls such as: glVertexArrayAttribFormat(vao, ...); glVertexArrayAttribBinding(vao, ...); glEnableVertexArrayAttrib(vao, ...); ... Note that VAO's are container objects that are not shared between contexts. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add _mesa_lookup_vao_errFredrik Höglund2015-05-082-0/+50
| | | | | | | This is a convenience function that generates GL_INVALID_OPERATION when the array object doesn't exist. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement CreateVertexArraysFredrik Höglund2015-05-084-8/+38
| | | | | | v2: Update the documentation for gen_vertex_arrays(). Reviewed-by: Laura Ekstrand <[email protected]>
* i965/skl: In opt_sampler_eot always set destination register to nullNeil Roberts2015-05-081-1/+1
| | | | | | | | | | | | | opt_sampler_eot enables a direct write to framebuffer from a sample. In order to do this the sample message needs to have a message header so if there wasn't one already then the function adds one. In addition the function sets the destination register to null because it's no longer used. However it was only doing this in cases where it was adding a message header. This patch just moves setting the destination so that it happens even if there's a messge header. In practice this doesn't seem to make any difference but it's a bit cleaner. Reviewed-by: Anuj Phogat <[email protected]>
* i965/fs: Set the header_size on LOAD_PAYLOAD in opt_sampler_eotNeil Roberts2015-05-081-0/+1
| | | | | | | | | | | Commit 94ee908448 added a header size parameter to the function to create the LOAD_PAYLOAD instruction. However this broke opt_sampler_eot which manually constructs the instruction and so wasn't setting the header_size. This ends up making the parameters for the send message all have the wrong location and it all falls apart. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* st/mesa: add double input support including lowering (v3.1)Dave Airlie2015-05-085-45/+164
| | | | | | | | | | | | | | | | | This takes a different approach to previously, we cannot index into the inputMapping with anything but the mesa attribute index, so we can't use the just add one to index trick, we need more info to add one to it after we've mapped the input. (Fixed copy propgation and cleaned up a little) v2: drop float64 format check, just attr->Doubles. merge enable patch. v3: cleanup code a bit. v3.1: minor review fixups (comment, newline) (Ilia) Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/vbo: add support for 64-bit vertex attributes. (v1)Dave Airlie2015-05-0813-55/+377
| | | | | | | | | | | | This adds support in the vbo and array code to handle double vertex attributes. v0.2: merge code to handle doubles in vbo layer. v1: don't use v0, merge api_array elt code. Acked-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: check total count of multi-slot double vertex attribsDave Airlie2015-05-081-1/+40
| | | | | | | | | | | | The spec is vague all over the place about this, but this seems to be the intent, we can probably make this optional later if someone makes hw that cares and writes a driver. Basically we need to double count some of the d types but only for totalling not for slot number assignment. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: track which program inputs are doublesDave Airlie2015-05-082-13/+4
| | | | | | | | instead of doing the attempts at dual slot handling here, let the backend do it. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: add ARB_vertex_attrib_64bit support. (v2)Dave Airlie2015-05-084-0/+9
| | | | | | | | | | | Just more boilerplate stuff. v2: bad fallthrough on versioning, this is my ugly but self contained solution (Ian) Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add ARB_vertex_attrib_64bit to extensions. (v2)Dave Airlie2015-05-083-1/+3
| | | | | | | | | | Just add the boilerplate bits. v2: add to version.c Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mapi: add GL_ARB_vertex_attrib_64bit supportDave Airlie2015-05-088-13/+151
| | | | | | | | This just adds the glapi bits. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/glsl_to_tgsi: fix ir_assignment hack doing bad things for doublesDave Airlie2015-05-081-0/+1
| | | | | | | | | | | This hack for fixing gl_FragDepth apparantly caused a GLSL shader outputting a single double to try and output a dvec4, but we hadn't assigned outputs for the secondary bit. This avoids going into the hack code for scalar doubles. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* i965/wm/gen6: Add option for disabling statistics collectionTopi Pohjolainen2015-05-072-4/+13
| | | | | | | | Normally this is always needed but for internal blits and clears we need to be able to disable it. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* i965/wm/gen6: Refactor state setupTopi Pohjolainen2015-05-072-45/+77
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* i965: Remove unused variablesAnuj Phogat2015-05-071-2/+0
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Change the order of conditions tested in ifAnuj Phogat2015-05-071-3/+4
| | | | | | | | Reduces the number of conditions tested in if to one in case of non-integer formats. Makes no functional changes. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* nir: Allow feq/fne/ieq/ine to be optimized with inot.Matt Turner2015-05-071-0/+4
| | | | | | | | instructions in affected programs: 380 -> 376 (-1.05%) helped: 2 Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Glenn Kennard <[email protected]>
* nir: Recognize (a < c || b < c) as min(a, b) < c.Matt Turner2015-05-071-0/+2
| | | | | | | | | | | | | | ... and (a >= c) || (b >= c) as max(a, b) >= c. Similar to commit 97e6c1b9. total instructions in shared programs: 6182276 -> 6182180 (-0.00%) instructions in affected programs: 6400 -> 6304 (-1.50%) helped: 68 HURT: 4 Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Glenn Kennard <[email protected]>