aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* docs: document the LIBGL_DRI3_DISABLE environment variableMartin Peres2015-05-081-0/+1
| | | | | | Suggested-by: Axel Davy <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* docs: update ARB_vertex_attrib_64bit statusDave Airlie2015-05-082-1/+2
| | | | | | Add to GL3.txt and release notes. Signed-off-by: Dave Airlie <[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]>
* nir: Recognize trivial min/max.Matt Turner2015-05-071-0/+6
| | | | | | | No changes, but does prevent some regressions in the next commit. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Glenn Kennard <[email protected]>
* nir: Recognize i2b(b2i(x)) as x.Matt Turner2015-05-071-0/+1
| | | | | | | | | | Helps the same set of programs as the previous commit. instructions in affected programs: 4490 -> 4346 (-3.21%) helped: 8 Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Glenn Kennard <[email protected]>
* nir: Recognize imul(b2i(a), b2i(b)) as a logical AND.Matt Turner2015-05-071-0/+1
| | | | | | | | | | | | Four shaders in Unreal 4's Sun Temple are helped, and gain SIMD16 because we avoid an integer multiplication. instructions in affected programs: 2353 -> 2245 (-4.59%) helped: 4 GAINED: 4 Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Glenn Kennard <[email protected]>
* i965/sync: Implement DRI2_Fence extensionChad Versace2015-05-074-41/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables EGL_KHR_fence_sync and EGL_KHR_wait_sync. Below is the difference in piglit results, before and after this patch. No regressions and several tests improve from 'skip' to 'pass'. Out of EGL_KHR_fence_sync tests, two of the multithreaded tests skip; all other tests pass. cmdline: piglit run -p gbm -t sync tests/quick.py mesa: master@1ac7db0 piglit: 4069bec hw: Ivybridge | before after ------+------------- pass | 32 46 fail | 0 0 crash | 0 0 skip | 35 21 total | 67 67 v2: - Set fence->signalled = true in brw_fence_has_completed() too. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/sync: Replace prefix 'intel_sync' -> 'intel_gl_sync'Chad Versace2015-05-072-28/+31
| | | | | | | | | | | | | | | | | | I'm about to implement DRI2_Fenc in intel_syncobj.c. To prevent madness, we need to prefix functions for GL_ARB_sync with 'gl' and functions for DRI2_Fence with 'dri'. Otherwise, the file will become a jumble of similiarly named functions. For example: old-name: intel_client_wait_sync() new-name: intel_gl_client_wait_sync() soon-to-come: intel_dri_client_wait_sync() I wrote this renaming commit separately from the commit that implements DRI2_Fence because I wanted the latter diff to be reviewable. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i915/sync: Return early when calloc failsChad Versace2015-05-071-0/+2
| | | | | Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/sync: Return NULL when calloc failsChad Versace2015-05-071-0/+2
| | | | | Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i915/sync: Don't crash when deleting sync objectChad Versace2015-05-071-1/+3
| | | | | | | | | Don't pass NULL to drm_intel_bo_unreference(). It doesn't like that. Bug found by code inspection. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/sync: Don't crash when deleting sync objectChad Versace2015-05-071-1/+3
| | | | | | | | | Don't pass NULL to drm_intel_bo_unreference(). It doesn't like that. Bug found by code inspection. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* egl/dri2: Fix codestyle in a commentChad Versace2015-05-071-1/+2
| | | | Pointed out by Kenneth Graunke. Trivial fix.
* glx: report which DRI version is used when in verbose debug modeMartin Peres2015-05-072-0/+4
| | | | | | | | This should make it more obvious in bug reports while also removing any sort of guesswork for developers. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* glapi: Add positional argument specifier.Vinson Lee2015-05-061-1/+1
| | | | | | | | | | | | | | | | | Fix build error introduced with commit 1c5a57a "glapi/es3.1: Add support for GLES versions > 3.0" with Python < 2.7. File "src/mapi/glapi/gen/gl_genexec.py", line 230, in <module> printer.Print(api) File "src/mapi/glapi/gen/gl_XML.py", line 120, in Print self.printBody(api) File "src/mapi/glapi/gen/gl_genexec.py", line 187, in printBody condition_parts.append('(ctx->API == API_OPENGLES2 && ctx->Version >= {})'.format(int(f.api_map['es2'] * 10))) ValueError: zero length field name in format Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* nv50/ir: add SHL to the list of U32 opcodesIlia Mirkin2015-05-061-0/+1
| | | | | | | | Having the wrong inferred type prevents a number of optimizations, including constant propagation (since float immediates work differently than integer immediates). Signed-off-by: Ilia Mirkin <[email protected]>
* i965: Sort extension enable listsIan Romanick2015-05-061-33/+42
| | | | | | | Sort by GEN, then sort by extension name. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* r600g: Fix Clang return-type build error.Vinson Lee2015-05-061-1/+1
| | | | | | | | | | | | | | Fix Clang return-type error introduced with commit 96f164f6f047833091eb98a73aa80c31dc94f962 "gallium: make pipe_context::begin_query return a boolean". CC r600_query.lo r600_query.c:443:3: error: non-void function 'r600_begin_query' should return a value [-Wreturn-type] return; ^ Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* i965/fs: Allow copy propagation on ATTR file registers.Kenneth Graunke2015-05-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | This especially helps with NIR because we currently emit MOVs at the top of the shader to copy from various ATTR registers to a giant VGRF array of all inputs. (This could potentially be done better, but since there's only ever one write to each register, it should be trivial to copy propagate away...) With NIR - only vertex shaders: total instructions in shared programs: 3129373 -> 2889581 (-7.66%) instructions in affected programs: 3119717 -> 2879925 (-7.69%) helped: 20833 Without NIR - only vertex shaders: total instructions in shared programs: 2745901 -> 2724483 (-0.78%) instructions in affected programs: 693426 -> 672008 (-3.09%) helped: 3516 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs_inst: Get rid of the effective_width fieldJason Ekstrand2015-05-063-37/+3
| | | | | | | | The effective_width field was an ill-concieved hack to get around issues in the LOAD_PAYLOAD instruction. Now that the LOAD_PAYLOAD instruction is far more sane, this field can die. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Rework the fs_visitor LOAD_PAYLOAD instructionJason Ekstrand2015-05-064-236/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newly reworked instruction is far more straightforward than the original. Before, the LOAD_PAYLOAD instruction was lowered by a the complicated and broken-by-design pile of heuristics to try and guess force_writemask_all, exec_size, and a number of other factors on the sources. Instead, we use the header_size on the instruction to denote which sources are "header sources". Header sources are required to be a single physical hardware register that is copied verbatim. The registers that follow are considered the actual payload registers and have a width that correspond's to the LOAD_PAYLOAD's exec_size and are treated as being per-channel. This gives us a fairly straightforward lowering: 1) All header sources are copied directly using force_writemask_all and, since they are guaranteed to be a single register, there are no force_sechalf issues. 2) All non-header sources are copied using the exact same force_sechalf and force_writemask_all modifiers as the LOAD_PAYLOAD operation itself. 3) In order to accommodate older gens that need interleaved colors, lower_load_payload detects when the destination is a COMPR4 register and automatically interleaves the non-header sources. The lower_load_payload pass does the right thing here regardless of whether or not the hardware actually supports COMPR4. This patch commit itself is made up of a bunch of smaller changes squashed together. Individual change descriptions follow: i965/fs: Rework fs_visitor::LOAD_PAYLOAD We rework LOAD_PAYLOAD to verify that all of the sources that count as headers are, indeed, exactly one register and that all of the non-header sources match the destination width. We then take the exec_size for LOAD_PAYLOAD directly from the destination width. i965/fs: Make destinations of load_payload have the appropreate width i965/fs: Rework fs_visitor::lower_load_payload v2: Don't allow the saturate flag on LOAD_PAYLOAD instructions i965/fs_cse: Support the new-style LOAD_PAYLOAD i965/fs_inst::is_copy_payload: Support the new-style LOAD_PAYLOAD i965/fs: Simplify setup_color_payload Previously, setup_color_payload was a a big helper function that did a lot of gen-specific special casing for setting up the color sources of the LOAD_PAYLOAD instruction. Now that lower_load_payload is much more sane, most of that complexity isn't needed anymore. Instead, we can do a simple fixup pass for color clamps and then just stash sources directly in the LOAD_PAYLOAD. We can trust lower_load_payload to do the right thing with respect to COMPR4. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Make LOAD_PAYLOAD take a header sizeJason Ekstrand2015-05-064-12/+20
| | | | Reviewed-by: Kenneth Graunke <[email protected]>