summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gallium/u_blitter: use 2D_ARRAY for cubemap blits if possibleMarek Olšák2017-06-075-22/+39
| | | | | | | | so that we can use TXF. The cubemap blit pixel shader code size: 148 -> 92 bytes Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_blitter: use TXF if possibleMarek Olšák2017-06-071-102/+190
| | | | | | | | | | | | | | | | | | This fixes piglit: arb_texture_view-rendering-r32ui TEX (image_sample) flushes denorms to 0 with FP32 textures on GCN, but such a texture can contain integer data written using an integer render view. If we do a transfer blit with TEX, denorms are flushed to 0. Luckily, TXF (image_load) doesn't do that. TXF also doesn't need to load the sampler state, so blit shaders don't have to do s_load_dwordx4. TXF doesn't do CLAMP_TO_EDGE, so it can only be used if the src box is in bounds, or if we clamp manually (this commit doesn't). Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_blitter: use TEX_LZ if it's supportedMarek Olšák2017-06-071-4/+8
| | | | | | | The sampler views always have first_level == last_level. Now radeonsi doesn't have to use the WQM. (a few SALU removed) Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/util: add _LZ and TXF options to simple shadersMarek Olšák2017-06-076-33/+77
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/ureg: add TEX/TXF_LZ opcodes to uregMarek Olšák2017-06-071-0/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* i965: Use BLORP for all HiZ opsJason Ekstrand2017-06-073-162/+10
| | | | | | | | BLORP has been capable of doing gen8-style HiZ ops for a while now. We might as well start using it. The one downside is that this may cause a bit more state emission since we still re-emit most things for BLORP. Reviewed-by: Topi Pohjolainen <[email protected]>
* blorp: Use FullSurfaceDepthandStencilClear for blorp_hiz_opJason Ekstrand2017-06-073-0/+5
| | | | | | | The blorp_hiz_op entrypoint always acts on a full subresource of a HiZ buffer so we can just set the flag unconditionally. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Move the post-HiZ-clear flush/stall to intel_hiz_execJason Ekstrand2017-06-072-16/+18
| | | | | | | | This also changes it to be predicated so we only do the flush/stall on clears and HiZ resolves. The docs only say it's needed for clears but empirical evidence says it's also needed for HiZ resolves. Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Plumb through access to the workaround BOJason Ekstrand2017-06-073-2/+32
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101283 Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/blorp: Move the depth cache flush outside of BLORPNanley Chery2017-06-072-8/+16
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel/blorp: Refactor the HiZ op interfaceJason Ekstrand2017-06-074-55/+60
| | | | | | | | | | This commit does a few things: 1) Now that BLORP can do HiZ ops on gen8+, drop the gen6 prefix. 2) Switch parameters to uint32_t to match the rest of blorp. 3) Take a range of layers and loop internally. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Inline gen6_blorp_execJason Ekstrand2017-06-071-18/+11
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Perform HiZ flush/stall prior to HiZ resolvesJason Ekstrand2017-06-071-13/+26
| | | | | Cc: "17.1" <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Move the pre-depth-clear flush/stalls to intel_hiz_execJason Ekstrand2017-06-072-56/+58
| | | | | Cc: "17.1" <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Take a layer range in intel_hiz_execJason Ekstrand2017-06-075-18/+16
| | | | | Cc: "17.1" <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Store fast clear colors in an isl_color_valueJason Ekstrand2017-06-0715-137/+91
| | | | | | | | | | | | | | | | | | | | | | | | This commit, out of necessity, makes a number of changes at once: 1) Changes intel_mipmap_tree to store the clear color for both color and depth as an isl_color_value. 2) Changes the depth/stencil emit code to do the format conversion of the depth clear value on Haswell and earlier instead of pulling a uint32_t directly from the miptree. 3) Changes ISL's depth/stencil emit code to perform the format conversion of the depth clear value on Haswell and earlier instead of assuming that the depth value in the float is pre-converted. 4) Changes blorp to pass the depth value through as a float. 5) Changes the Vulkan driver to pass the depth value to blorp as a float rather than a uint. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* dri3/GLX: Fix drawable invalidation v2Thomas Hellstrom2017-06-071-0/+6
| | | | | | | | | | | | | | | | | | | A number of internal VMware apitrace traces image comparisons fail with dri3 because the viewport transformation becomes incorrect after an X drawable resize. The incorrect viewport transformation sometimes persist until the second draw-call after a swapBuffer. Comparing with the dri2 glx code there are a couple of places where dri2 invalidates the drawable in the absence of server-triggered invalidation, where dri3 doesn't do that. When these invalidation points are added to dri3, the image comparisons become correct. v2: Addressed review comment by Michel Dänzer. Cc: <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-and-tested-by: Michel Dänzer <[email protected]>
* i965: Fix alpha to one with dual color blending.Kenneth Graunke2017-06-071-13/+44
| | | | | | | | | | | | | | | | | | | The BLEND_STATE documentation says that alpha to one must be disabled when dual color blending is enabled. However, it appears that it simply fails to override src1 alpha to one. We can work around this by leaving alpha to one enabled, but overriding SRC1_ALPHA to ONE and ONE_MINUS_SRC1_ALPHA to ZERO. This appears to be what the other driver does, and it looks like it works despite the documentation saying not to do it. Fixes spec/ext_framebuffer_multisample/alpha-to-one-dual-src-blend * Piglit tests. v2: Add UNUSED to shut up warning on generations which don't use this. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: add KHR_no_error support for glTexSubImage*D()Samuel Pitoiset2017-06-073-3/+64
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add texsubimage() helperSamuel Pitoiset2017-06-071-0/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: make _mesa_texture_sub_image() staticSamuel Pitoiset2017-06-071-20/+20
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: rename texsubimage() to texsubimage_err()Samuel Pitoiset2017-06-071-17/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glCopyImageSubData()Samuel Pitoiset2017-06-073-1/+31
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add copy_image_subdata() helperSamuel Pitoiset2017-06-071-31/+45
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add prepare_target() helperSamuel Pitoiset2017-06-071-0/+24
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: rename prepare_target() to prepare_target_err()Samuel Pitoiset2017-06-071-16/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBlitNamedFramebuffer()Samuel Pitoiset2017-06-072-0/+27
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add blit_named_framebuffer() helperSamuel Pitoiset2017-06-071-31/+54
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBlitFramebuffer()Samuel Pitoiset2017-06-073-1/+22
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add validate_depth_buffer() helperSamuel Pitoiset2017-06-071-29/+43
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add validate_stencil_buffer() helperSamuel Pitoiset2017-06-071-34/+47
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add validate_color_buffer() helperSamuel Pitoiset2017-06-071-61/+77
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: wrap blit_framebuffer() into blit_framebuffer_err()Samuel Pitoiset2017-06-071-9/+25
| | | | | | | Also add ALWAYS_INLINE to blit_framebuffer(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add 'no_error' parameter to blit_framebuffer()Samuel Pitoiset2017-06-071-97/+95
| | | | | | | | The whole GLES3 block has been moved before the buffer validation checks. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: make _mesa_blit_framebuffer() staticSamuel Pitoiset2017-06-072-23/+14
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBindBuffer()Samuel Pitoiset2017-06-073-1/+14
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glInvalidateBufferData()Samuel Pitoiset2017-06-073-1/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glInvalidateBufferSubData()Samuel Pitoiset2017-06-073-1/+16
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add invalidate_buffer_subdata() helperSamuel Pitoiset2017-06-071-4/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBindVertexBuffers()Samuel Pitoiset2017-06-073-1/+19
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glVertexArrayVertexBuffers()Samuel Pitoiset2017-06-073-1/+22
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add vertex_array_vertex_buffers_err() helperSamuel Pitoiset2017-06-071-47/+61
| | | | | | | | This also adds a 'no_error' parameter to vertex_array_vertex_buffer() to be used in a following patch. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glScissor*()Samuel Pitoiset2017-06-074-4/+48
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add scissor() and scissor_array() helpersSamuel Pitoiset2017-06-071-20/+35
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: rename ScissorIndexed() to scissor_indexed_err()Samuel Pitoiset2017-06-071-6/+9
| | | | | | | | And move GET_CURRENT_CONTEXT() into the APIENTRY calls for consistency. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: use _mesa_set_scissor() in ScissorIndexed()Samuel Pitoiset2017-06-071-4/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: make _mesa_scissor_bounding_box() staticSamuel Pitoiset2017-06-072-9/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: inline update_image_transfer_state() into _mesa_update_pixel()Samuel Pitoiset2017-06-071-14/+6
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove useless check in _mesa_update_pixel()Samuel Pitoiset2017-06-073-5/+4
| | | | | | | | | The only caller is _mesa_update_state_locked() which already checks if _NEW_PIXEL is set before calling _mesa_update_pixel(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glcpp: fix #undef to match latest spec update and GLSLang implementationIago Toral Quiroga2017-06-071-14/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLSL ES spec includes the following: "It is an error to undefine or to redefine a built-in (pre-defined) macro name." But desktop GLSL doesn't. This has sparked some discussion in Khronos, and the final conclusion was to update the GLSL 4.50 spec to include the following: "By convention, all macro names containing two consecutive underscores ( __ ) are reserved for use by underlying software layers. Defining or undefining such a name in a shader does not itself result in an error, but may result in unintended behaviors that stem from having multiple definitions of the same name. All macro names prefixed with “GL_” (“GL” followed by a single underscore) are also reserved, and defining or undefining such a name results in a compile-time error." In other words, undefining GL_* names should be an error, but undefining other names with a double underscore in them is not strictly prohibited in desktop GLSL. This patch fixes the preprocessor to apply these rules, following exactly the implementation already present in GLSLang. This fixes some tests in CTS. Khronos bug: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16003 Fixes: KHR-GL45.shaders.preprocessor.definitions.undefine_core_profile_vertex KHR-GL45.shaders.preprocessor.definitions.undefine_core_profile_fragment Reviewed-by: Samuel Pitoiset <[email protected]>