aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radv: advertise VK_AMD_shader_image_load_store_lodSamuel Pitoiset2020-01-093-0/+3
| | | | | | | This extension allows to use LOD with image read/write operations. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* aco: handle nir_intrinsic_image_deref_{load,store} with lodSamuel Pitoiset2020-01-091-2/+17
| | | | | | | | | Use image_load_mip and image_store_mip respectively if the lod parameter isn't zero. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/llvm: handle nir_intrinsic_image_deref_{load,store} with lodSamuel Pitoiset2020-01-091-2/+10
| | | | | | | | Use image_load_mip and image_store_mip respectively if the lod parameter isn't zero. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* spirv,nir: add new lod parameter to image_{load,store} intrinsicsSamuel Pitoiset2020-01-0910-2/+57
| | | | | | | | | | | | SPV_AMD_shader_image_load_store_lod allows to use a lod parameter with OpImageRead, OpImageWrite and OpImageSparseRead. According to the specification, this parameter should be a 32-bit integer. It is initialized to 0 when no lod parameter is found during SPIR-V->NIR translation. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* 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]>