summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove the ATI_envmap_bumpmap extensionJason Ekstrand2014-06-3032-860/+8
| | | | | | | | | | | As far as I can tell, the Intel mesa driver is the only driver in the world still supporting this legacy extension. If someone wants to do bump mapping, they can use shaders. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> [v1] Reviewed-by: Chris Forbes <[email protected]> [v2] Reviewed-by: Ian Romanick <[email protected]> [v3]
* meta: Use AMD_vertex_shader_layer instead of a GS for layered clears.Kenneth Graunke2014-06-301-37/+16
| | | | | | | | | | | | | | | | | | | | | | | On i965, enabling and disabling the GS is not free: you have to do a full pipeline stall, reconfigure the URB and push constant space, and emit a bunch of state. Most clears aren't layered, so the GS isn't needed in the common case. But we turned it on universally. Using AMD_vertex_shader_layer allows us to skip setting up the GS altogether, while achieving the same effect. According to Ilia, current nVidia GPUs can't do AMD_vertex_shader_layer. However, since nouveau is Gallium-based, they're unlikely to ever care about this path. Intel and AMD GPUs both support the extension. Since i965 is the only driver using this path which does layered rendering, we may as well target it at that. v2: Improve commit message. No code changes. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* docs: mark "Geometry shader multiple streams" as done for i965Samuel Iglesias Gonsalvez2014-06-301-1/+1
| | | | | Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* i965: Enable vertex streams up to MAX_VERTEX_STREAMS.Iago Toral Quiroga2014-06-301-0/+4
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: Enable simultaneous queries on different streams.Iago Toral Quiroga2014-06-302-10/+11
| | | | | | | | It should be possible to query the number of primitives written to each individual stream by a geometry shader in a single draw call. For that we need to have up to MAX_VERTEX_STREAM separate query objects. Reviewed-by: Ian Romanick <[email protected]>
* i965: Implement GL_PRIMITIVES_GENERATED with non-zero streams.Iago Toral Quiroga2014-06-302-7/+26
| | | | | | | | | | | | | | | | | So far we have been using CL_INVOCATION_COUNT to resolve this query but this is no good with streams, as only stream 0 reaches the clipping stage. Instead we will use SO_PRIM_STORAGE_NEEDED which can keep track of the primitives sent to each individual stream. Since SO_PRIM_STORAGE_NEEDED is related to the SOL stage and according to ARB_transform_feedback3 we need to be able to query primitives generated in each stream whether transform feedback is active or not what we do is to enable the SOL unit even if transform feedback is not active but disable all output buffers in that case. This effectively disables transform feedback but permits activation of statistics enabling SO_PRIM_STORAGE_NEEDED even when transform feedback is not active. Reviewed-by: Chris Forbes <[email protected]>
* i965: Implement GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN with non-zero streams.Iago Toral Quiroga2014-06-301-4/+4
| | | | Reviewed-by: Chris Forbes <[email protected]>
* mesa: Include stream information in indexed queries.Iago Toral Quiroga2014-06-302-0/+2
| | | | Reviewed-by: Ian Romanick <[email protected]>
* glsl: include streamId when reading/printing ir_variable IR.Samuel Iglesias Gonsalvez2014-06-302-2/+11
| | | | | | Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: include streamId when reading/printing emit-vertex and end-primitive IR.Iago Toral Quiroga2014-06-302-8/+27
| | | | Reviewed-by: Ian Romanick <[email protected]>
* i965/gs: Set control data bits for vertices emitted in stream mode.Iago Toral Quiroga2014-06-302-1/+51
| | | | | | | In stream mode we have to set control data bits with the StreamID information for every vertex. Reviewed-by: Chris Forbes <[email protected]>
* glsl: Validate vertex emission in geometry shaders.Iago Toral Quiroga2014-06-301-14/+134
| | | | | | | Check if non-zero streams are used. Fail to link if emitting to unsupported streams or emitting to non-zero streams with output type other than GL_POINTS. Reviewed-by: Chris Forbes <[email protected]>
* glsl: Add support for EmitStreamVertex() and EndStreamPrimitive().Iago Toral Quiroga2014-06-301-0/+58
| | | | Reviewed-by: Chris Forbes <[email protected]>
* glsl: Modify ir_end_primitive to have a stream.Iago Toral Quiroga2014-06-307-16/+64
| | | | | | | This will be necessary to implement EndStreamPrimitive(). EndPrimitive() will produce an ir_end_primitive with the default stream 0. Reviewed-by: Chris Forbes <[email protected]>
* glsl: Modify ir_emit_vertex to have a stream.Iago Toral Quiroga2014-06-3010-21/+68
| | | | | | | This will be necessary to implement EmitStreamVertex(). EmitVertex() will produce an ir_emit_vertex with the default stream 0. Reviewed-by: Chris Forbes <[email protected]>
* i965/gs: Set number of control data bits for stream mode.Iago Toral Quiroga2014-06-301-4/+5
| | | | | | | | | If the geometry shader is indeed using streams then we need 2 control data bits per vertex for the StreamID. If the shader is not using streams then we don't need control data bits. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Store info about geometry shaders that emit vertices to non-zero streams.Iago Toral Quiroga2014-06-304-0/+5
| | | | | | | | | | | On Intel hardware when a geometry shader outputs GL_POINTS primitives we only need to emit vertex control bits if it emits vertices to non-zero streams, so use a flag to track this. This flag will be set to TRUE when a geometry shader calls EmitStreamVertex() or EndStreamPrimitive() with a non-zero stream parameter in a later patch. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Only geometry shader outputs can be associated with non-zero streams.Iago Toral Quiroga2014-06-301-0/+5
| | | | | | | This should be ensured by the parser, so assert on that. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Two varyings can't write to the same buffer from different streams.Iago Toral Quiroga2014-06-301-0/+17
| | | | | | | If this is detected, fail to link. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add methods to retrive a varying's name and streamId.Iago Toral Quiroga2014-06-301-0/+10
| | | | | Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Fail to link if inter-stage input/outputs are not assigned to stream 0Iago Toral Quiroga2014-06-301-0/+8
| | | | | | | Outputs that are linked to inputs in the next stage must be output to stream 0, otherwise we should fail to link. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Assign GLSL StreamIds to transform feedback outputs.Iago Toral Quiroga2014-06-302-3/+16
| | | | | | Inter-shader outputs must be on stream 0, which is the default. Reviewed-by: Chris Forbes <[email protected]>
* i965: Enable transform feedback for streams > 0Iago Toral Quiroga2014-06-301-24/+43
| | | | | | | Configure hardware to read vertex data for all streams and have all streams write their varyings to the corresponsing output buffers. Reviewed-by: Ian Romanick <[email protected]>
* mesa: add StreamId information to transform feedback outputs.Iago Toral Quiroga2014-06-302-0/+2
| | | | | | | For now initialized to the default stream 0. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add parsing support for multi-stream output in geometry shaders.Samuel Iglesias Gonsalvez2014-06-307-1/+144
| | | | | | | | This implements parsing requirements for multi-stream support in geometry shaders as defined in ARB_gpu_shader5. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/omx: strcpy the string into the allocated bufferEmil Velikov2014-06-281-3/+3
| | | | | | | | | | This fixes commit a001ca98e15(st/omx: keep the name, (name|role)_specific strings dynamically allocated) in which we dynamically allocated the buffers for name and (name|role)_specific yet forgot to copy the encoder strings into them. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80614 Signed-off-by: Emil Velikov <[email protected]>
* mesa: expose ARB_seamless_cubemap_per_texture when supportedIlia Mirkin2014-06-282-0/+2
| | | | | | | | All of the bits appear to already be in place to support this in the sampler (which the original AMD version didn't allow). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/omx: keep the name, (name|role)_specific strings dynamically allocatedEmil Velikov2014-06-272-9/+52
| | | | | | | | | | ... as it's caller (the external program omxregister-bellagio) is the one who frees all of the allocated memory. Reported-by: Pedretti Fabio <[email protected]> Tested-by: Fabio Pedretti <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]>
* docs: Update the status of a few things in GL3.txtChris Forbes2014-06-271-8/+8
| | | | Signed-off-by: Chris Forbes <[email protected]>
* nv50: fix dri3 prime buffer creationAxel Davy2014-06-271-2/+6
| | | | | | | | | This is the same fix than "nvc0: fix dri3 prime buffer creation" Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nvc0: fix dri3 prime buffer creationDave Airlie2014-06-271-1/+1
| | | | | | | | We need to place shared buffers into GART. Reviewed-by: Axel Davy <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium/dri2: implement blitImageAxel Davy2014-06-271-3/+51
| | | | | | | | | V3: call flush_resource before flush V4: Add new flags Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* dri/image: add blitImage to the specificationAxel Davy2014-06-271-1/+23
| | | | | | | | It allows to blit two __DRIimages. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: Add __DRIimageDriverExtension support to galliumAxel Davy2014-06-271-183/+286
| | | | | | | | | | | | | | | | | | __DRIimageDriverExtension is used by GLX DRI3 and Wayland. This patch is a rewrite of http://lists.freedesktop.org/archives/mesa-dev/2014-May/060318.html and http://lists.freedesktop.org/archives/mesa-dev/2014-May/060317.html Previous patches were: Signed-off-by: Ben Skeggs <[email protected]> Signed-off-by: Keith Packard <[email protected]> Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* dri3: use invalidate.Axel Davy2014-06-271-0/+7
| | | | | | | | | | This doesn't change anything to the intel DRI3 implementation, but enables the gallium implementation to use dri2.stamp instead of relying on the stamp shared with the st backend. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* dri3: fix image extension checking.Dave Airlie2014-06-271-10/+6
| | | | | | | | | Move the image extension setup in with all the others in bind_extensions, and improve the check to both version and function pointer. Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glxext: Send the Drawable's ID in the GLX_BufferSwapComplete eventJasper St. Pierre2014-06-272-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | While the official INTEL_swap_event specification says that the drawable field should contain the GLXDrawable, not the Drawable, the existing DRI2 code in dri2.c that translates from DRI2_BufferSwapComplete sends out GLX_BufferSwapComplete with the Drawable's ID, so existing codebases like Clutter/Cogl rely on getting the Drawable. Match DRI2's error here and stuff the event with the X Drawable, not the GLX drawable. This fixes apps seeing wrong drawables through an indirect GLX context or with DRI3, which uses the GLX_BufferSwapComplete event directly on the wire instead of translates Present in mesa. At the same time, also modify the structure for the event to make sure that clients don't make the same mistake. This is not an API or ABI break, as GLXDrawable and Drawable are both typedefs for XID. Signed-off-by: Jasper St. Pierre <[email protected]> Reviewed-by: Axel Davy <[email protected]> Cc: "10.1 10.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* i965: Enable compressed multisample support (CMS) on Broadwell.Kenneth Graunke2014-06-261-8/+0
| | | | | | | Everything is in place and appears to be working. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Add 2x MSAA support to the MCS allocation function.Kenneth Graunke2014-06-261-0/+1
| | | | | | | 2x MSAA also uses 8 bits, just like 4x. More bits are unused. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Hook up the MCS buffers in SURFACE_STATE on Broadwell.Kenneth Graunke2014-06-261-0/+10
| | | | | | | | | MCS buffers are never allocated on Broadwell, so this does nothing for now, but puts the infrastructure in place for when they do exist. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* i965: Drop SINT workaround for CMS layout on Broadwell.Kenneth Graunke2014-06-261-3/+1
| | | | | | | | | According to the documentation, we don't need this SINT workaround on Broadwell. (Or at least, it doesn't mention that we need it.) Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* i965: Add plumbing for Broadwell's auxiliary surface support.Kenneth Graunke2014-06-261-7/+37
| | | | | | | | | | | | | | Broadwell generalizes the MCS fields to allow for multiple kinds of auxiliary surfaces. This patch adds the plumbing to set those values, but doesn't yet hook any up. v2: (by Jordan Justen) Use mt for qpitch; pitch is tiles - 1. v3: Don't forget to subtract 1 from aux_mt->pitch. v4: Drop unnecessary aux_mt->offset (caught by Jordan Justen). Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* i965: Add auxiliary surface field #defines for Broadwell.Jordan Justen2014-06-261-0/+10
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* i965: Disassemble all of DP write message control bits on Gen6.Kenneth Graunke2014-06-261-1/+1
| | | | | | | | | Prior to the new brw_inst API, the brw_instruction structure split off bits 4 and 5 of msg_control for specific fields, and we failed to disassemble them. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Pass brw to brw_try_compact_instruction().Matt Turner2014-06-263-5/+4
| | | | | Signed-off-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add is_cherryview flag to brw_context.Matt Turner2014-06-262-0/+2
| | | | | Signed-off-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add CSEL opcode definition for Gen8.Matt Turner2014-06-261-0/+1
| | | | | Signed-off-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Document which instructions are generation specific.Matt Turner2014-06-261-20/+20
| | | | | Signed-off-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Don't set UIP for ENDIF/WHILE.Matt Turner2014-06-261-0/+4
| | | | | | | | | | They don't have a UIP. We used UIP in an array dereference, which never caused problems on Gen < 8, since UIP was a small integer (number of instructions). On Gen 8 UIP is in bytes, so it's large enough that it caused us to read out of bounds of the array. Signed-off-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Replace struct brw_compact_instruction with brw_compact_inst.Matt Turner2014-06-266-61/+24
| | | | | Signed-off-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>