summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: add field to track if xfb_buffer is an explicit or implicit valueTimothy Arceri2016-03-314-0/+17
| | | | | | | | | Since any of the xfb_* qualifiers trigger the shader to be in transform feedback mode we need an extra field to track if the xfb_buffer on interface members was set explicitly since xfb_buffer will always have a default value. Reviewed-by: Dave Airlie <[email protected]>
* glsl: add xfb_* qualifiers to glsl_struct_fieldTimothy Arceri2016-03-313-2/+26
| | | | | | | | | | | | | These will be used to hold qualifier values for interface and struct members. Support is added to the struct/interface constructors to copy these fields upon creation. We also update record_compare() to ensure we don't reuse a glsl_type with the wrong xfb_* qualifier values. Reviewed-by: Dave Airlie <[email protected]>
* glsl: add IR fields for transform feedback layout qualifiersTimothy Arceri2016-03-311-1/+26
| | | | | | | Adds xfb_buffer/stride fields and adds comment to offset field which is reused for xfb_offset. Reviewed-by: Dave Airlie <[email protected]>
* glsl: add validation for out layout qualifiersTimothy Arceri2016-03-311-2/+31
| | | | | | | This adds validation for all qualifiers as allowed by the table in Section 4.4 (Layout Qualifiers) of the GLSL 4.5 spec. Reviewed-by: Dave Airlie <[email protected]>
* glsl: relax stage restrictions on layout defaults for outputsTimothy Arceri2016-03-312-7/+7
| | | | | | | The new xfb_buffer and xfb_stride global qualifiers are allowed in geom, tess and vertex stages. Reviewed-by: Dave Airlie <[email protected]>
* glsl: parse new transform feedback layout qualifiersTimothy Arceri2016-03-314-3/+95
| | | | | | | | | | | | | | | | | | | | | | We reuse the existing offset field for holding the xfb_offset expression but create a new flag as to avoid hitting the rules for the offset qualifier for UBOs. xfb_buffer qualifiers require extra processing when merging as they can be applied to global out defaults. We just apply the same rules as we do for the stream qualifier as the spec says: "The *xfb_buffer* qualifier follows the same conventions, behavior, defaults, and inheritance rules as the qualifier stream, and the examples for stream apply here as well." For xfb_stride we push everything into a global out field for later processing as xfb_stride applies to the entire buffer. We still need to have a separate field to store per variable strides because they can still effect implicit offsets e.g. when applied to block members with implicit offsets. Reviewed-by: Dave Airlie <[email protected]>
* glsl: move process_qualifier_constant() to ast_type.cppTimothy Arceri2016-03-313-41/+47
| | | | | | We will make use of this function being here in the following patch. Reviewed-by: Dave Airlie <[email protected]>
* glsl: add transform feedback built-in constantsTimothy Arceri2016-03-313-0/+15
| | | | | | These are new built-ins added by ARB_enhanced_layouts. Reviewed-by: Dave Airlie <[email protected]>
* glsl: generate named interface block names correctlyTimothy Arceri2016-03-316-95/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firstly this updates the named interface lowering pass to store the interface without the arrays removed. Note we need to remove the arrays in the interface/varying matching code to not regress things but in future this should be fixed futher as it would seem we currently successfully match interface blocks with differnt array sizes. Since we now know if the interface was an array we can reduce the IR flags from_named_ifc_block_array and from_named_ifc_block_nonarray to just from_named_ifc_block. Next rather than having a different code path for named interface blocks in program_resource_visitor we just make use of the one used by UBOs this allows us to now handle arrays of arrays correctly. Finally we add a new param to the recursion function named_ifc_member this is because we only want to process a single member at a time. Note that this is also the glsl_struct_field from the original ifc type before lowering rather than the type from the lowered variable. This fixes a bug in Mesa where we would generate the names like WithInstArray[0].g[0][0] when it should be WithInstArray[0].g[0] for the following interface. out WithInstArray { float g[3]; } instArray[2]; Reviewed-by: Dave Airlie <[email protected]>
* glsl: Fix segfault when lhs is error_type in TCSTimothy Arceri2016-03-311-1/+1
| | | | | | | | | It seems expected that both lhs and rhs could be of type error_type in this code however the TCS case wasn't expecting it. Fixes segfault in an enhanced layouts GL CTS test. Reviewed-by: Dave Airlie <[email protected]>
* docs: update softpipe status for shader_image_load_store.Dave Airlie2016-03-312-2/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* softpipe: add image support to softpipe (v3)Dave Airlie2016-03-3114-12/+928
| | | | | | | | | | This adds support for ARB_shader_image_load_store to softpipe. v2: add RESQ support (Ilia) v3: constify, cleanup internals, add some comments (Brian). Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* draw: add support for passing images to vs/gs shaders.Dave Airlie2016-03-315-2/+29
| | | | | | | | This just adds support for passing through images to the tgsi execution stage. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: add support for image operations to tgsi_exec. (v2.1)Dave Airlie2016-03-315-6/+319
| | | | | | | | | | | | This adds support for load/store/atomic operations on images along with image tracking support. v2: add RESQ support. (Ilia) v2.1: constify interface (Brian) split get_image_coord_dim (Brian) Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* softpipe: add support for explicit early depth testingDave Airlie2016-03-316-12/+21
| | | | | | | | | | | | ARB_shader_image_load_store adds support for explicit early depth testing. However we need to make sure we don't overwrite values using the shader written values in this case. This fixes early depth testing in softpipe to conform with those requirements. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: introduce NonHelperMaskDave Airlie2016-03-312-0/+5
| | | | | | | | | This is a mask of which of the current 2x2 grid are non-helper invocations. This allows us to mask off the helper invocations later for the image operations. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi_exec: handle execmask when doing indirect lookupsDave Airlie2016-03-311-3/+9
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi_exec: add support for up to 3 address registers (v2)Dave Airlie2016-03-311-2/+3
| | | | | | | v2: be consistent with other definitions. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nir: Propagate negates up multiplication chains.Matt Turner2016-03-301-0/+4
| | | | | | | | | | total instructions in shared programs: 7112159 -> 7088092 (-0.34%) instructions in affected programs: 1374915 -> 1350848 (-1.75%) helped: 7392 HURT: 621 GAINED: 2 LOST: 2
* i965: Don't inline intel_batchbuffer_require_space().Matt Turner2016-03-302-26/+28
| | | | | | | | | | | | It's called by the inline intel_batchbuffer_begin() function which itself is used in BEGIN_BATCH. So in sequence of code emitting multiple packets, we have inlined this ~200 byte function multiple times. Making it an out-of-line function presumably improved icache usage. Improves performance of Gl32Batch7 by 3.39898% +/- 0.358674% (n=155) on Ivybridge. Reviewed-by: Abdiel Janulgue <[email protected]>
* r600: ignore PIPE_BIND_LINEAR in *_is_format_supportedChristian König2016-03-302-0/+10
| | | | | | | | Similar to radeonsi linear layout should work for all not compressed or depth/stencil formats. Fixes issues with VDPAU on r600. Signed-off-by: Christian König <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* st/vdpau: correct null checkThomas Hindoe Paaboel Andersen2016-03-301-4/+4
| | | | | | | The null check of result was the wrong way around. Also, move memset and dereference of result after the null check. Reviewed-by: Christian König <[email protected]>
* docs: remove docs/COPYING which contains GPL licenseBrian Paul2016-03-301-490/+0
| | | | | | There hasn't been GPL code in Mesa for a long time now. Reviewed-by: Jose Fonseca <[email protected]>
* glsl: add missing types for buffer imagesSamuel Pitoiset2016-03-301-12/+12
| | | | | | | | | | | Type of GLSL_SAMPLER_DIM_BUF can be sampler or image. Spotted while trying to run dEQP tests related to ARB_shader_image_load_store. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* glsl: invalidate float suffixes for GLSL 1.10 and GLSL ES 1.00Lars Hamre2016-03-291-0/+7
| | | | | | | | | | | | | | | | | | Float suffixes are not allowed in GLSL 1.10 nor GLSL ES 1.00. Fixes the following piglit tests: tests/spec/glsl-1.10/compiler/literals/invalid-float-suffix-capital-f.vert tests/spec/glsl-1.10/compiler/literals/invalid-float-suffix-f.vert` v2: modify error message v3: parse the float instead of returning an ERROR_TOK v4: (by Ken) Change to is_version(120, 300) to avoid breaking ES3 shaders; update commit message accordingly. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81585 Signed-off-by: Lars Hamre <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi: (trivial) only verify target for is_tex instructionsRoland Scheidegger2016-03-301-8/+7
| | | | | | | | | | | d3d10 state tracker does not encode (valid) target (only offsets are really used from the texture bits), since that information always comes from the sview dcl, and not the instruction (note the meaning of target is actually slightly different between gl and d3d10 in any case, because d3d10 target does never include shadow bit). Also move the msaa sampler identification as well - would need to set that on the sview not sampler, so while this does not fix it make it at least obvious it won't work with sample instructions.
* mesa: allow mutable buffer textures to back GL ES imagesIlia Mirkin2016-03-291-1/+6
| | | | | | | | | Since there is no way to create immutable texture buffers in GL ES, mutable buffer textures are allowed to back images. See issue 7 of the GL_OES_texture_buffer specification. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: make _mesa_prepare_mipmap_level() staticBrian Paul2016-03-292-15/+8
| | | | | | | | | No longer called from any other file. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Tested-by: Ian Romanick <[email protected]>
* meta: use _mesa_prepare_mipmap_levels()Brian Paul2016-03-291-24/+8
| | | | | | | | | | | | | | | | | | | | | | | | The prepare_mipmap_level() wrapper for _mesa_prepare_mipmap_level() is not needed. It only served to undo the GL_TEXTURE_1D_ARRAY height/depth change was was made before the call to prepare_mipmap_level() Said another way, regardless of how the meta code manipulates the height/ depth dims for GL_TEXTURE_1D_ARRAY, the gl_texture_image dimensions are correctly set up by _mesa_prepare_mipmap_levels(). Tested by plugging _mesa_meta_GenerateMipmap() into the swrast driver and testing with piglit. v2 (idr): Early out of the mipmap generation loop with dstImage is NULL. This can occur for immutable textures that have a limited range of levels or in the presense of memory allocation failures. Fixes arb_texture_view-mipgen on Intel platforms. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Tested-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* docs: add HTTP link for Mesa downloadsBrian Paul2016-03-291-1/+3
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92628 Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* tgsi: simplify tgsi_shader_info::is_msaa_sampler checkingBrian Paul2016-03-291-3/+2
| | | | | | | | | We assert that fullinst->Instruction.Texture != 0 above so no need to check it in the conditional. We also have the fullinst->Texture.Texture value in a local variable, so use it. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: collect texture sampler target info in tgsi_scan_shader()Brian Paul2016-03-292-2/+37
| | | | | | | | | | | | | | | Texture sample instructions specify a sampler unit and texture target such as "1D", "2D", "CUBE", etc. Sampler view declarations also specify the sampler unit and texture target. This patch checks that the texture instructions agree with the declarations and collects the texture target type for each sampler unit. v2: only compare instruction's texture target to the sampler view declaration target if the instruction is a TEX instruction, not a SAMPLE instruction. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/docs: s/gven/given/Brian Paul2016-03-291-1/+1
|
* xlib: add support for GLX_ARB_create_contextBrian Paul2016-03-293-0/+77
| | | | | | | | | | | | | | | | | This adds the glXCreateContextAttribsARB() function for the xlib/swrast driver. This allows more piglit tests to run with this driver. For example, without this patch we get: $ bin/fbo-generatemipmap-1d -auto piglit: error: waffle_config_choose failed due to WAFFLE_ERROR_UNSUPPORTED_ ON_PLATFORM: GLX_ARB_create_context is required in order to request an OpenGL version not equal to the default value 1.0 piglit: error: Failed to create waffle_config for OpenGL 2.0 Compatibility Context piglit: info: Failed to create any GL context PIGLIT: {"result": "skip" } Reviewed-by: Jose Fonseca <[email protected]> Acked-by: Roland Scheidegger <[email protected]>
* st/mesa: simplify st_generate_mipmap()Brian Paul2016-03-291-78/+24
| | | | | | | | | | | | | | | | | The whole st_generate_mipmap() function was overly complicated. Now we just call the new _mesa_prepare_mipmap_levels() function to prepare the texture mipmap memory, then call the generate function which fills in the texture images. This fixes a failed assertion in llvmpipe/softpipe which is hit with the new piglit generatemipmap-base-change test. Also fixes some device errors (format mismatches) with the VMware svga driver. v2: fix a comment typo, per Sinclair Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: new _mesa_prepare_mipmap_levels() function for mipmap generationBrian Paul2016-03-292-31/+62
| | | | | | | | | | | | Simplifies the loops in generate_mipmap_uncompressed() and generate_mipmap_compressed(). Will be used in the state tracker too. Could probably be used in the meta code. If so, some additional clean-ups can be done after that. v2: use unsigned types instead of GLuint, per Ian Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* i965: Don't use CUBE wrap modes for integer formats on IVB/BYT.Kenneth Graunke2016-03-291-1/+5
| | | | | | | | | | | | | | | | There is no linear filtering for integer formats, so we should always be using CLAMP_TO_EDGE mode. Fixes 46 dEQP cases on Ivybridge (which were likely broken by commit 0faf26e6a0a34c3544644852802484f2404cc83e). This workaround doesn't appear to be necessary on any other hardware; I haven't found any documentation mentioning errata in this area. v2: Only apply on Ivybridge/Baytrail to avoid regressing GLES3.1 tests. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> [v1]
* Revert "i965: Set address rounding bits for GL_NEAREST filtering as well."Kenneth Graunke2016-03-291-6/+3
| | | | | | | This reverts commit 60d6a8989ab44cf47accee6bc692ba6fb98f6a9f. It's pretty sketchy, and apparently regressed a bunch of dEQP tests on Sandybridge.
* gallium: Format code in pb_buffer_fenced.c according to style guide.Rovanion Luckey2016-03-291-129/+97
| | | | | | | | | | | | | | This is a tiny housekeeping patch which does the following: * Replaced tabs with three spaces. * Formatted oneline and multiline code comments. Some doxygen comments weren't marked as such and some code comments were marked as doxygen comments. * Spaces between if- and while-statements and their parenthesis. According to the mesa coding style guidelines. Reviewed-by: Brian Paul <[email protected]>
* svga: emit sampler declarations in the helper function for non vgpu10Charmaine Lee2016-03-293-3/+23
| | | | | | | | | | | | | With commit dc9ecf58c0c5c8a97cd41362e78c2fcd9f6e3b80, we are now getting the sampler target from the sampler view declaration. But since a sampler view declaration can be defined after a sampler declaration, we need to emit the sampler declarations in the pre-helpers function, otherwise, the sampler target might not have defined yet for the sampler declaration. Fixes viewperf maya-03 and various gl trace regressions in hwv11. Reviewed-by: Brian Paul <[email protected]>
* svga: avoid freeing non-malloced memoryBrian Paul2016-03-291-10/+2
| | | | | | | | | | | svga_shader_expand() will fall back to using non-malloced memory for emit.buf if malloc fails. We should check if the memory is malloced before freeing it in the error path of svga_tgsi_vgpu9_translate. Original patch by Thomas Hindoe Paaboel Andersen <[email protected]>. Remove trivial svga_destroy_shader_emitter() function, by BrianP. Signed-off-by: Brian Paul <[email protected]>
* nvc0/ir: move load/store lowering pass to handleLDST()Samuel Pitoiset2016-03-292-54/+61
| | | | | | | Having all this code in a big switch is not really a good pratice. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: implement new DMA-buf based VDPAU interop v2Christian König2016-03-291-49/+132
| | | | | | | | | | Avoid using internal structures from another API. v2: rebase and moved includes so they don't cause problem when VDPAU isn't installed. Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (v1) Reviewed-by: Leo Liu <[email protected]>
* st/vdpau: implement the new DMA-buf based interop v2Christian König2016-03-294-3/+116
| | | | | | | | | That should allow us to get away from passing internal structures around. v2: rebased Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/vdpau: move FormatRGBAToPipe into the interopChristian König2016-03-295-28/+73
| | | | | | | We are going to need that in the Mesa state tracker as well. Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/vdpau: add new interop interfaceChristian König2016-03-292-1/+100
| | | | | | | | Use DMA-buf for the VDPAU interop interface instead of using internal structures. Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/vdpau: use linear layout for output surfacesChristian König2016-03-291-1/+2
| | | | | | | | Works around a bug in radeonsi and tiling is actually not very beneficial in this use case. Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* radeonsi: ignore PIPE_BIND_LINEAR in si_is_format_supported v2Christian König2016-03-291-0/+5
| | | | | | | | | Linear layout should work for all not compressed or depth/stencil formats. v2: restrict it a bit more Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: enable OES_texture_buffer when all components availableIlia Mirkin2016-03-291-0/+6
| | | | | | | | OES_texture_buffer combines bits from a number of desktop extensions. When they're all available, turn it on. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glapi/glx: Mark the indirect swapped dispatch functions _X_COLDAdam Jackson2016-03-291-3/+3
| | | | | | | | | | | A modest size savings: text data bss dec hex filename 264143 15608 232 279983 445af libglx.so.before 254303 15608 232 270143 41f3f libglx.so.after Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Adam Jackson <[email protected]>