summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* aco: use NIR_MAX_VEC_COMPONENTS instead of 4Karol Herbst2019-12-212-7/+7
| | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/serialize: cast swizzle before shiftingKarol Herbst2019-12-211-1/+1
| | | | | | | fixes undefined behaviour with enabled vec16 Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* llvmpipe: switch to NIR by defaultDave Airlie2019-12-213-8/+24
| | | | | | | | | | Add LP_DEBUG=tgsi_ir (tgsi already taken) to fallback to TGSI paths. Disable NIR_VALIDATE in CI (Michel/Eric acked) Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2303> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2303>
* gallivm/nir: wrap idiv to avoid divide by 0 (v2)Dave Airlie2019-12-211-4/+21
| | | | | | | | | | This code is taken from the TGSI paths, and should fix the regression seens with GLES2 v2: use the udiv path which has d3d10 defined return. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2303>
* ac/surface: fix an assertion failure on gfx9 in CMASK computationMarek Olšák2019-12-201-0/+1
| | | | | | | | | | | addrlib only allows the 2D resource type with CMASK. Fixes: 69ea473eeb9 "amd/addrlib: update to the latest version" Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3187> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3187>
* pan/midgard: Optimize comparisions with similar operationsAfonso Bordado2019-12-204-1/+92
| | | | | | | | | Optimizes comparisions by removing the invert flag on operands which we can prove to be equal without the invert. Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3036> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3036>
* lima: set shader caps to optimize control flowErico Nunes2019-12-201-2/+16
| | | | | | | | | | | With these new caps, nir is able to unroll loops and optimize conditionals much more efficiently in both gpit and ppir. panfrost and vc4 were used as reference for the values. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3176> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3176>
* lima/ppir: remove assert on ppir_emit_tex unsupported featureErico Nunes2019-12-201-1/+0
| | | | | | | | | | | This assert causes testing tools such as shaderdb to abort on some test cases. This is an unsupported feature and not a compiler bug. The compilation error is already propagated correctly, so we can remove the assert to allow testing tools to run to completion. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3176>
* lima/ppir: fix lod bias srcErico Nunes2019-12-205-11/+16
| | | | | | | | | | | | | | | | | | | | ppir has some code that operates on all ppir_src variables, and for that uses ppir_node_get_src. lod bias support introduced a separate ppir_src that is inaccessible by that function, causing it to be missed by the compiler in some routines. Ultimately this caused, in some cases, a bug in const lowering: .../pp/lower.c:42: ppir_lower_const: Assertion `src != NULL' failed. This fix moves the ppir_srcs in ppir_load_texture_node together so they don't get missed. Fixes: 721d82cf061 lima/ppir: add lod-bias support Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3185> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3185>
* lima: Fix dump file creationAndreas Baierl2019-12-201-3/+5
| | | | | | | | | | | | Otherwise lima_dump_file_next() always opens a new file and creates the dumps regardless of what the environment variables say. Fixes d71cd245d74 ('lima: Rotate dump files after each finished pp frame') Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Andreas Baierl <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3179> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3179>
* radeon/vcn2: enable rate control for hevc encodingPierre-Eric Pelloux-Prayer2019-12-201-1/+7
| | | | | | | | | | Based on b0626c1f306 ("radeon/vcn: enable rate control for hevc encoding"). Reviewed-by: Boyuan Zhang <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2225 Fixes: 587b9c5dae6 ("radeon/vcn: implement vcn 2.0 encode") Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3134> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3134>
* radv: rely on pipeline layout when creating push descriptors with templateSamuel Pitoiset2019-12-201-1/+12
| | | | | | | | | | | descriptorSetLayout should be ignored for push descriptors. While we are it, also ignore pipelineBindPoint. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2210 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3180> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3180>
* etnaviv: Replace bitwise OR with logical ORMarek Vasut2019-12-201-1/+1
| | | | | | | | | The test here is testing whether either variable is non-zero. While currently the test works fine, it's fragile. Replace it with logical OR to avoid the fragility. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: update resource status after flushingChristian Gmeiner2019-12-201-0/+8
| | | | | | | | | | | Currently piglit spec@arb_occlusion_query@occlusion_query_conform spins for ever as the resource status is never reset. See etna_hw_get_query_result(..) for more details. Fixes: 1456aa61cc5 ("etnaviv: Rework resource status tracking") CC: <[email protected]> Signed-off-by: Christian Gmeiner <[email protected]> Tested-by: Marek Vasut <[email protected]>
* intel: limit shader geometry on BDW GT1Ross Zwisler2019-12-201-1/+2
| | | | | | | | | | | | | | | | | | | | | Similar to the SKL GT1 fix introduced here: https://gitlab.freedesktop.org/asimiklit/mesa/commit/b1ba7ffdbd54fdb5da18d086c7b7a830e06a1cff we need to limit the .urb.max_entries[MESA_SHADER_GEOMETRY] on BDW GT1 to address failures in these two tests: dEQP-GLES31.functional.geometry_shading.layered.render_with_default_layer_3d dEQP-GLES31.functional.geometry_shading.layered.render_with_default_layer_2d_array The value 690 was found via bisection. 691 is the actual max on the hardware I'm using, but 690 seemed like a nice round number. Signed-off-by: Ross Zwisler <[email protected]> Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3173> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3173>
* pan/midgard: Lower txd with lower_texAlyssa Rosenzweig2019-12-201-1/+6
| | | | | | | | | | | | This is a hack since we do have native gradient stuff, but for the moment I'm more interested in conformance and the lowered code is good enough. Fixes dEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler2d_fixed_fragment Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3169> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3169>
* pan/midgard: Fix crash with txsAlyssa Rosenzweig2019-12-201-1/+3
| | | | | | | | This regressed since we implemented RECT textures natively, oops. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3169>
* pan/midgard: Implement textureOffset for 2D texturesAlyssa Rosenzweig2019-12-209-14/+57
| | | | | | | | Fixes dEQP-GLES3.functional.shaders.texture_functions.textureoffset.sampler2d_fixed_fragment. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3169>
* radv: ignore pColorBlendState if rasterization is disabledSamuel Pitoiset2019-12-201-5/+21
| | | | | | | | | Or if the subpass has no color attachments. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3167> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3167>
* radv: tidy up radv_pipeline_init_blend_state()Samuel Pitoiset2019-12-201-112/+115
| | | | | | | | | | This is needed for the next commit because pColorBlendState can actually be NULL but some fields might have to be initialized (eg. alpha to coverage with no color attachments). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3167>
* radv: ignore pDepthStencilState if rasterization is disabledSamuel Pitoiset2019-12-201-5/+15
| | | | | | | | Or if the subpass has no depth stencil attachment. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3167>
* radv: ignore pTessellationState if the pipeline doesn't use tessSamuel Pitoiset2019-12-201-2/+16
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3167>
* radv: ignore pMultisampleState if rasterization is disabledSamuel Pitoiset2019-12-201-7/+15
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3167>
* radv: init a default multisample state for the resolve FS pathSamuel Pitoiset2019-12-201-1/+6
| | | | | | | | pMultisampleState must be a valid pointer. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3167>
* spirv: Implement SPV_KHR_non_semantic_infoCaio Marcelo de Oliveira Filho2019-12-191-0/+29
| | | | | | | | | | | | Do nothing for OpExtInst from extended instruction sets that name start with "NonSemantic.". Since they can be used within the "preamble" to annotate global decorations, also don't stop iterating when one of them is found. Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3154> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3154>
* turnip: disable B8G8R8 vertex formatsJonathan Marek2019-12-191-6/+6
| | | | | | | | | Looks like swap doesn't work as expected on these, disable them. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3170> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3170>
* util/format: add missing vulkan formatsJonathan Marek2019-12-194-8/+78
| | | | | | | | | Add some missing vulkan formats to util/format, this solves all the missing pipe format cases for the formats that turnip supports. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3170>
* turnip: minor warning fixesJonathan Marek2019-12-192-2/+2
| | | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3177> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3177>
* lima: Rotate dump files after each finished pp frameAndreas Baierl2019-12-195-13/+48
| | | | | | | | | | | | | | This rotates the dump files like the mali-syscall-tracker does. After each finished pp frame a new file is generated. They are numbered like lima.dump.0000, lima.dump.0001 ... The filename and path can be given with the new environment variable LIMA_DUMP_FILE. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Andreas Baierl <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3175> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3175>
* lima: drop suballocatorVasily Khoruzhick2019-12-194-30/+14
| | | | | | | | | | Since we're using a separate per-draw BO for GP outputs we don't need suballocator anymore. Reviewed-by: Erico Nunes <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3158> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3158>
* lima: use single BO for GP outputsVasily Khoruzhick2019-12-193-43/+43
| | | | | | | | | | Varyings, gl_Position and gl_PointSize are all GP outputs, so we can use a single BO for them all. Also that allows us to get rid of suballocator. Reviewed-by: Erico Nunes <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3158>
* nir: fix assign_io_var_locations for vertex inputsJonathan Marek2019-12-191-3/+9
| | | | | | | | | | Also fixes fragment inputs using the wrong "base" value (which was working only because FRAG_RESULT_DATA0 is less than VARYING_SLOT_VAR0) Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3108> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3108>
* turnip: implement secondary command buffersJonathan Marek2019-12-193-2/+62
| | | | | | | | | | Uses a new "tu_cs_add_entries" function because tu_cs_emit_call doesn't work inside draw_cs (which is already called by tu_cs_emit_call). Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3075> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3075>
* turnip: compute gmem offsets at renderpass creation timeJonathan Marek2019-12-194-66/+82
| | | | | | | | | | This makes it easier to implement secondary command buffers, since we no longer need to know the render area to set the gmem offsets for input attachments and CmdClearAttachments. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3075>
* turnip: emit_compute_driver_params fixesJonathan Marek2019-12-191-17/+14
| | | | | | | | | | | | Offset was wrong, it is in vec4 not dwords. There's a hole between DP_NUM_WORK_GROUPS_Z and DP_LOCAL_GROUP_SIZE_X so use the IR3 enums. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3162> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3162>
* turnip: emit base instance vs driver paramJonathan Marek2019-12-191-0/+53
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3162>
* freedreno/ir3: support load_base_instanceJonathan Marek2019-12-194-1/+12
| | | | | | | | Not supported by hardware, uses same mechanism as base vertex. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3162>
* freedreno/registers: document vertex/instance id offset bitsJonathan Marek2019-12-193-3/+8
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3162>
* st/mesa: release tgsi tokens for shader statesNeha Bhende2019-12-191-0/+4
| | | | | | | | | | | | Since we are using st_common_variant while creating variant for vertext program, we can release tokens created in st_create_vp_variant which are already stored in respective states. This fix memory leak found with piglit tests Fixes bc99b22a305b ('st/mesa: use a separate VS variant for the draw module') Reviewed-by: Charmaine Lee <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* Revert "nir/lower_double_ops: relax lower mod()"Juan A. Suarez Romero2019-12-191-15/+6
| | | | | | | | | This reverts commit 8172b1fa03fe74165728bfb182c98a3e62193d2b. This commit was done taking in account Vulkan spec, but did not realize it was affecting OpenGL too. Closes: #2252
* freedreno/a6xx: Set up multisample sysmem MRTs correctlyKristian H. Kristensen2019-12-191-3/+1
| | | | | | | | | We had an extra factor of num_samples in the stride. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
* freedreno/a6xx: Rewrite compressed blits in a helper functionKristian H. Kristensen2019-12-191-33/+63
| | | | | | | | Similar to how we handle zs blits. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
* freedreno/a6xx: Move handle_rgba_blit() upKristian H. Kristensen2019-12-191-53/+51
| | | | | | | | If we move this function up, we don't have to forward declare it. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
* freedreno/a6xx: Handle srgb blits on the blitterKristian H. Kristensen2019-12-191-10/+20
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
* freedreno/a6xx: Use A6XX_SP_2D_SRC_FORMAT_MASK macroKristian H. Kristensen2019-12-191-1/+1
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
* freedreno/a6xx: RB6_R8G8B8 is actually 32 bit RGBXKristian H. Kristensen2019-12-195-12/+12
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
* freedreno/a6xx: Use blitter for resolve blitsKristian H. Kristensen2019-12-191-24/+5
| | | | | | | | | We have a SAMPLES_AVERAGE bit that does what we need for resolving multisample buffers - let's use it. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
* freedreno/a6xx: Add fd_resource_swap() helperKristian H. Kristensen2019-12-194-5/+12
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
* freedreno/a6xx: Pick blitter swap based on resource tilingKristian H. Kristensen2019-12-191-2/+5
| | | | | | | | | | The linear levels in a tiled resource are stored in the canonical swap, WZYX. We need to pick the swap based on whether or not the resource is tiled, not whether the the level in question is tiled. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
* freedreno/a6xx: Program sampler swap based on resource tilingKristian H. Kristensen2019-12-191-16/+4
| | | | | | | | It doesn't matter whether or not the level in question is linear. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>