aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* spirv: add SpvCapabilityImageReadWriteLodAMDSamuel Pitoiset2020-01-092-0/+5
| | | | | | | New SPIR-V capability for SPV_AMD_shader_image_load_store_lod. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* mesa: create program resource hash in a single placeTapani Pälli2020-01-094-6/+3
| | | | | | | | | This is a cleanup but also a fix for commit dd09f1d806b. In case of i965 we did not actually create hash for cached shader programs. Fixes: dd09f1d806b "mesa/st/i965: add a ProgramResourceHash for quicker resource lookup" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* llvmpipe: add support for ARB_indirect_parameters.Dave Airlie2020-01-094-20/+23
| | | | | | | | | This just adds support for getting the draw count from the indirect buffer. Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
* llvmpipe: enable driver side multi draw indirectDave Airlie2020-01-091-1/+2
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
* gallium/util: add multi_draw_indirect to util_draw_indirect.Dave Airlie2020-01-091-9/+13
| | | | | | | | ARB_indirect_parameters needs drivers to deal with mutli_draw_indirect themselves. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
* mesa: Prevent _MaxLevel from being less than zeroThong Thai2020-01-081-1/+1
| | | | | | | | | | When decoding using VDPAU, the _MaxLevel value becomes -1 due to NumLevels being equal to 0 at a certain point, and decoding fails due to an assertion later on. Signed-off-by: Thong Thai <[email protected]> Signed-off-by: Marek Olšák <[email protected]> Cc: 19.2 19.3 <[email protected]>
* ac: add ac_build_s_endpgmMarek Olšák2020-01-082-0/+7
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac: add 128-bit bitcountMarek Olšák2020-01-082-0/+12
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac/gpu_info: add pc_lines and use it in radeonsiMarek Olšák2020-01-083-1/+5
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac: unify primitive export codeMarek Olšák2020-01-084-113/+78
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac: unify build_sendmsg_gs_alloc_reqMarek Olšák2020-01-084-48/+31
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: clean up messy si_emit_rasterizer_prim_stateMarek Olšák2020-01-085-39/+30
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: determine accurately if line stippling is enabled for performanceMarek Olšák2020-01-083-4/+17
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: test polygon mode enablement accuratelyMarek Olšák2020-01-081-2/+4
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: fix context roll tracking in si_emit_shader_vsMarek Olšák2020-01-081-3/+3
| | | | | | probably harmless, because we don't need to track context rolls on gfx10 Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: fix monolithic pixel shaders with two-sided colors and SampleMaskInMarek Olšák2020-01-081-2/+2
| | | | | | They are never used except for testing AMD_DEBUG=mono. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac/gpu_info: always use distributed tessellation on gfx10Marek Olšák2020-01-081-2/+2
| | | | | | | This might fix a hang on Navi14. Cc: 19.2 19.3 <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* gallium: bypass u_vbuf if it's not needed (no fallbacks and no user VBOs)Marek Olšák2020-01-087-31/+113
| | | | | | | This decreases CPU overhead, because u_vbuf is completely bypassed in those cases. Acked-by: Alyssa Rosenzweig <[email protected]>
* gallium/cso_context: move non-vbuf vertex buffer and element code into helpersMarek Olšák2020-01-081-24/+43
| | | | | | These will be reused. Acked-by: Alyssa Rosenzweig <[email protected]>
* gallium: put u_vbuf_get_caps return values into u_vbuf_capsMarek Olšák2020-01-085-22/+28
| | | | Acked-by: Alyssa Rosenzweig <[email protected]>
* etnaviv: remove unnecessary vertex_elements_state_create error checkingJonathan Marek2020-01-081-17/+3
| | | | | | | | | PIPE_CAP_MAX_VERTEX_BUFFERS already sets the maximum vertex_buffer_index. There's no need to error on num_elements == 0 (if that can even happen). Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: implement gl_VertexID/gl_InstanceIDJonathan Marek2020-01-084-0/+21
| | | | | | | | Fixes: dEQP-GLES3.functional.instanced.* Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: HALTI2+ instanced drawJonathan Marek2020-01-085-11/+28
| | | | | | | | | Fixes: dEQP-GLES3.functional.draw.draw_arrays_instanced.* dEQP-GLES3.functional.draw.draw_elements_instanced.* Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: update headers from rnndbJonathan Marek2020-01-081-6/+31
| | | | | | | Update to etna_viv commit 46af5f1d. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* anv: don't close invalid syncfd semaphoreLionel Landwerlin2020-01-081-1/+2
| | | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Cc: <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* gallium/swr: Fix glVertexPointer race condition.Krzysztof Raszkowski2020-01-083-31/+16
| | | | | | | | | Sometimes using user buffer (not VBO) e.g. glVertexPointer one thread could free memory before other thread used it. Instead of copying this memory to driver simplier thing is to block until draw finish. Reviewed-by: Jan Zielinski <[email protected]>
* intel/disasm: Fix decoding of src0 of SENDSJason Ekstrand2020-01-081-1/+1
| | | | | | | | | There is no instruction field for the register file for src0 because it's always GRF. Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3309> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3309>
* meta: Add cleanup function for BitmapYevhenii Kolesnikov2020-01-081-0/+17
| | | | | | | Buffer object and temporary texture were never freed, causing memory leaks. Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* nir/spirv: skip unreachable blocks in Phi second passJuan A. Suarez Romero2020-01-081-0/+5
| | | | | | | | | | | | | Only the blocks that are reachable are inserted with an end_nop instruction at the end. When handling the Phi second pass, if the Phi has a parent block that does not have an end_nop then it means this block is unreachable, and thus we can ignore it, as the Phi will never come through it. Fixes dEQP-VK.graphicsfuzz.uninit-element-cast-in-loop. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* radeonsi: check ctx->sdma_cs before using itPierre-Eric Pelloux-Prayer2020-01-081-1/+2
| | | | | | | | | | e5167a9276de1f383888714b41d3a9be2b9c1da9 disabled SDMA for gfx8. This caused 3 piglit arb_sparse_buffer tests (basic, buffer-data and commit) to crash on GFX8. Reported-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Fixes: e5167a9276d ("radeonsi: disable SDMA on gfx8 to fix corruption on RX 580")
* radv: do not fill keys from fragment shader twiceSamuel Pitoiset2020-01-081-14/+0
| | | | | | | radv_fill_shader_info() already does that. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* main: allow external textures for BindImageTextureYevhenii Kolesnikov2020-01-081-1/+5
| | | | | | | | | | | | | From issue 10 of the OES_EGL_image_external_essl3: A limited set of use-cases is enabled by making glBindImageTexture accept external textures. Shaders can access such external textures using the existing <image2D> sampler type. Fixes: 02a6d901eee ("mesa: add OES_EGL_image_external_essl3 support") Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* intel/nir: Add a memory barrier before barrier()Jason Ekstrand2020-01-071-0/+14
| | | | | | | | | | | Our barrier instruction does not implicitly do a memory fence but the GLSL barrier() intrinsic is supposed to. The easiest back-portable solution is to just add the NIR barriers. We'll sort this out more properly in later commits. Cc: [email protected] Closes: #2138 Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* radv: Emit a BATCH_BREAK when changing pixel shaders or CB_TARGET_MASK.Bas Nieuwenhuizen2020-01-073-18/+65
| | | | | | | | | | | | | | | | | | | | | | Fixes a hang on Raven with Resident Evil 2. I did not find anything more restricted to fix it: - Setting persistent_states_per_bin to 1 fixes it too, but likely does an internal break on any descriptor set changes too. - Only breaking the batch when cb_target_mask changes does not fix it (and looking at AMDVLK comments, I suspect the code in radeonsi should really be doing a FLUSH_DFSM). - Always doing a FLUSH_DFSM on shader switch helps, but that is more often than this and I don't think we should be doing that when DFSM is disabled. - Also emitting the existing break on framebuffer change when DFSM is disabled does not fix the issue. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2315 CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa/st/i965: add a ProgramResourceHash for quicker resource lookupTapani Pälli2020-01-077-5/+95
| | | | | | | | | | | | Many resource APIs require searching by name, add a hash table to make this faster. Currently we traverse the whole resource list for name based queries, this change makes all these cases use the hash. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2203 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3254> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3254>
* gitlab-ci: Test against LLVM / clang 9 on x86Michel Dänzer2020-01-075-13/+88
| | | | | | | | They're not available for Debian buster yet, so we have to use upstream snapshot packages again. In contrast to earlier, we now store the LLVM APT repository key in Git instead of re-downloading it every time.
* panfrost: Don't double-flip Z/W for 2D arraysAlyssa Rosenzweig2020-01-071-2/+5
| | | | | | | | | We need to mindful that we don't clobber the shadow comparator. Fixes dEQP-GLES3.functional.shaders.texture_functions.texture.sampler2darrayshadow_* Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
* pan/midgard: Account for z/w flip in texelFetchAlyssa Rosenzweig2020-01-071-0/+9
| | | | | | | | | Required for proper txf of 2D arrays. Fixes dEQP-GLES3.functional.shaders.texture_functions.texelfetch.*2darray* Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
* panfrost: Adjust for mismatch between hardware/Gallium in arrays/cubeAlyssa Rosenzweig2020-01-071-11/+33
| | | | | | | | | | | The hardware separates face selection and array indexing, it looks like, whereas Gallium smushes them together with some modulus fun. Let's fix it so mipmapped 2D arrays work without regressing cubemaps. Fixes dEQP-GLES3.functional.texture.filtering.2d_array.* among others. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
* panfrost: Respect constant buffer_offsetAlyssa Rosenzweig2020-01-071-2/+4
| | | | | | | | Fixes dEQP-GLES3.functional.ubo.multi_basic_types.single_buffer.* among others Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
* glsl: use nir version of check_image_resources() for nir linkerTimothy Arceri2020-01-072-1/+2
| | | | Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: add check_image_resources() for the nir linkerTimothy Arceri2020-01-071-0/+38
| | | | | | | | This is adapted from the GLSL IR code but doesn't need to iterate over the IR. I believe this also fixes a potential bug in the GLSL IR code which potentially counts the same output twice. Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: use nir linker to link atomicsTimothy Arceri2020-01-073-3/+15
| | | | Reviewed-by: Alejandro Piñeiro <[email protected]>
* mesa: add new UseNIRGLSLLinker constantTimothy Arceri2020-01-071-0/+3
| | | | | | | This will be used to disable some GLSL IR passes in following patches. Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: reorder link_and_validate_uniforms() callsTimothy Arceri2020-01-071-1/+1
| | | | | | This is required for the following commit. Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: add new gl_nir_link_glsl() helperTimothy Arceri2020-01-072-0/+14
| | | | | | | | This will allow us to do some linking in NIR that was previously done by the GLSL IR linker. To start with this just has calls for linking atomics. Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: add gl_nir_link_check_atomic_counter_resources()Timothy Arceri2020-01-072-0/+95
| | | | | | | This is pretty much a copy of link_check_atomic_counter_resources() updated to work with the NIR linker. Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: rename gl_nir_link() to gl_nir_link_spirv()Timothy Arceri2020-01-074-7/+7
| | | | | | | | A NIR based glsl linking function will be too different to the spirv version to bother attempting any sharing. So lets change the name to be explicit. Reviewed-by: Alejandro Piñeiro <[email protected]>
* st/mesa: Lower vars to ssa and constant prop before gl_nir_lower_buffersKristian H. Kristensen2020-01-061-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gl_nir_lower_buffers pass relies on recognizing the same literal constants as the GLSL compiler so that constant buffer array indices are constant in nir as well. Without this, get_block_array_index() would see vec1 32 ssa_723 = deref_var &const_temp@1 (function_temp int) vec1 32 ssa_724 = load_const (0x00000001 /* 0.000000 */) ... vec1 32 ssa_5 = deref_var &const_temp@1 (function_temp int) vec1 32 ssa_6 = intrinsic load_deref (ssa_5) (0) /* access=0 */ vec1 32 ssa_7 = deref_var &blockB (ssbo BlockB[1]) vec1 32 ssa_8 = deref_array &(*ssa_7)[ssa_6] (ssbo BlockB) /* &blockB[ssa_6] */ instead of a literal 1, and ultimately generate the block name BlockB[0]. That used to work, since we before the previous commits we'd compact the block binding points and names. Thus, there would always be a BlockB[0]. Now, if an entry in a block array isn't used, we don't generate that block name, which means that if entry 0 isn't used BlockB[0] isn't present and then get_block_array_index() fails to find the block. In most cases we would have dealt with this in the call to st_nir_opts() in st_nir_link_shaders(), but in the num_shaders == 1 case (for example, compute) we would call gl_nir_lower_buffers() before we lowered GLSL constants. Move that corner case up next to where we call st_nir_link_shaders() so we call st_nir_opts() at the same point in the flow for all shaders. Fixes: dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.18 Signed-off-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl/nir: do not change an element index to have correct block nameAndrii Simiklit2020-01-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | When SSBO array is used with packed layout, both IR tree and as a result, NIR tree will be incorrect. In fact, the SSBO dereference indices won't match the array size in some cases like the following: "layout(packed, binding=1) buffer SSBO { vec4 a; } ssbo[3]; out vec4 color; void main() { color = ssbo[2].a; }" After linking the IR and then NIR will have an SSBO array definition with size 1 but dereference still will have index 2 and linked_shader->Program->sh.ShaderStorageBlocks will contain just SSBO with name "SSBO[2]" So this line should be removed at least as a workaround for now to avoid error like: Failed to find the block by name "SSBO[0]" Fixes: 810dde2a "glsl/nir: Add a pass to lower UBO and SSBO access" Signed-off-by: Andrii Simiklit <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>