platform/upstream/mesa.git
2 years agoaux/trace: fix vertex state tracing
Mike Blumenkrantz [Fri, 5 Nov 2021 15:09:34 +0000 (11:09 -0400)]
aux/trace: fix vertex state tracing

Fixes: e8cad57aa7a ("gallium/trace: add pipe_vertex_state support")

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13582>

2 years agoaux/trace: trace pipe_screen::is_format_supported better
Mike Blumenkrantz [Fri, 29 Oct 2021 16:09:41 +0000 (12:09 -0400)]
aux/trace: trace pipe_screen::is_format_supported better

storage_sample_count is important

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13582>

2 years agoaux/trace: support pipe_context::get_query_result_resource
Mike Blumenkrantz [Thu, 28 Oct 2021 20:23:11 +0000 (16:23 -0400)]
aux/trace: support pipe_context::get_query_result_resource

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13582>

2 years agoaux/trace: fix PIPE_QUERY_PIPELINE_STATISTICS_SINGLE tracing
Mike Blumenkrantz [Thu, 28 Oct 2021 20:18:38 +0000 (16:18 -0400)]
aux/trace: fix PIPE_QUERY_PIPELINE_STATISTICS_SINGLE tracing

don't just crash, dump!

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13582>

2 years agoutil/u_trace: Replace Flag with IntEnum to support python3.5
Kostiantyn Lazukin [Wed, 3 Nov 2021 11:23:52 +0000 (13:23 +0200)]
util/u_trace: Replace Flag with IntEnum to support python3.5

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5586

Fixes: cefaa73909718e570b36c5f8463e4b534e96201a

Signed-off-by: Kostiantyn Lazukin <kostiantyn.lazukin@globallogic.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13643>

2 years agointel/devinfo: fix wrong offset computation
Lionel Landwerlin [Fri, 25 Jun 2021 08:35:10 +0000 (11:35 +0300)]
intel/devinfo: fix wrong offset computation

A bit difficult to find what commit introduced the issue because of
all the renaming, but it was my bug :)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>

2 years agointel/devinfo: use compatible type for ARRAY_SIZE
Lionel Landwerlin [Mon, 12 Apr 2021 11:27:25 +0000 (14:27 +0300)]
intel/devinfo: use compatible type for ARRAY_SIZE

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>

2 years agointel/perf: fix perf equation subslice mask generation for gfx12+
Lionel Landwerlin [Sat, 3 Apr 2021 10:34:11 +0000 (13:34 +0300)]
intel/perf: fix perf equation subslice mask generation for gfx12+

v2: Fix comment change (Marcin)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>

2 years agointel/dev: fix subslice/eu total computations with some fused configurations
Lionel Landwerlin [Sat, 3 Apr 2021 10:28:50 +0000 (13:28 +0300)]
intel/dev: fix subslice/eu total computations with some fused configurations

When a device has its first slice/subslice fused off, we can't use the
number of slices/subslices to iterate the mask array.

v2: Fix spelling (Marcin)
    Use size_t for iterator (Marcin)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: Matt Roper <matthew.d.roper@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5601
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>

2 years agointel/dev: reuse internal functions to set mask
Lionel Landwerlin [Sat, 3 Apr 2021 10:23:55 +0000 (13:23 +0300)]
intel/dev: reuse internal functions to set mask

Rather than having 2 paths to set the slice/subslice/eu masks, reuse
the other internal functions. This simplifies finding bugs within this
code :

  * If we have i915 query topology support, update_from_topology() is
    called.

  * If we don't have query topology support but we have getparam for
    slice/subslice/EU, we generate a topology data and call
    update_from_topology()

  * If we have no kernel support to query any kind of topology, we
    generate the values return by the kernel for slice/subslice/EU and
    call update_from_masks() which in turns calls
    update_from_topology()

v2: Fixup typo (Adam)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>

2 years agointel/dev: don't forget to set max_eu_per_subslice in generated topology
Lionel Landwerlin [Sat, 3 Apr 2021 11:21:32 +0000 (14:21 +0300)]
intel/dev: don't forget to set max_eu_per_subslice in generated topology

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>

2 years agointel/dev: fix HSW GT3 number of subslices in slice1
Lionel Landwerlin [Sat, 3 Apr 2021 10:22:50 +0000 (13:22 +0300)]
intel/dev: fix HSW GT3 number of subslices in slice1

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>

2 years agonir/algebraic: optimize Cyberpunk 2077's open-coded bitfieldReverse()
Rhys Perry [Thu, 4 Nov 2021 10:32:13 +0000 (10:32 +0000)]
nir/algebraic: optimize Cyberpunk 2077's open-coded bitfieldReverse()

fossil-db (Sienna Cichlid):
Totals from 9 (0.01% of 128647) affected shaders:
CodeSize: 29900 -> 28640 (-4.21%)
Instrs: 5677 -> 5443 (-4.12%)
Latency: 96561 -> 95025 (-1.59%)
Copies: 571 -> 544 (-4.73%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13673>

2 years agomesa: remove NEW_COPY_TEX_STATE
Pierre-Eric Pelloux-Prayer [Tue, 2 Nov 2021 13:05:24 +0000 (14:05 +0100)]
mesa: remove NEW_COPY_TEX_STATE

Since _NEW_PIXEL isn't handled in _mesa_update_state anymore, we can
replace NEW_COPY_TEX_STATE by _NEW_BUFFERS.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13596>

2 years agomesa: always call _mesa_update_pixel
Pierre-Eric Pelloux-Prayer [Tue, 2 Nov 2021 13:01:06 +0000 (14:01 +0100)]
mesa: always call _mesa_update_pixel

10c75ae4 moved handling of this state to the functions that
depend on ctx->_ImageTransferState.

So we can't depend on _NEW_PIXEL being set to call this function,
since it'll be always clear earlier by _mesa_update_state_locked.

Example sequence that would trigger the issue:
  glPixelTransferi(...)
  glClear(...)
  glTexSubImage2D(...) <-- won't use the new value set by
                           glPixelTransferi because glClear caused
                           _NEW_PIXEL to be cleared.

_NEW_PIXEL itself is kept because st_update_pixel_transfer depends
on it.

Fixes: 10c75ae4 ("mesa: move _mesa_update_pixel out of _mesa_update_state")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5273
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13596>

2 years agoRevert "radv: only enable VK_EXT_display_control for vrcompositor (SteamVR)"
Samuel Pitoiset [Thu, 4 Nov 2021 17:21:40 +0000 (18:21 +0100)]
Revert "radv: only enable VK_EXT_display_control for vrcompositor (SteamVR)"

It's fixed now.

This reverts commit db7ad0c1700e2f012730898e02bc0cebf1b04304.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13682>

2 years agobuild: add sha1_h for lp_texture.c
orbea [Wed, 3 Nov 2021 22:02:11 +0000 (15:02 -0700)]
build: add sha1_h for lp_texture.c

../mesa-9999/src/gallium/drivers/llvmpipe/lp_texture.c:55:10: fatal error: git_sha1.h: No such file or directory

Fixes: 1608a815e3305d229091 ("llvmpipe: add support for EXT_memory_object(_fd)")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: orbea <orbea@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13665>

2 years agoiris: Use mi_builder in iris_load_indirect_location()
Jordan Justen [Tue, 2 Nov 2021 10:36:04 +0000 (03:36 -0700)]
iris: Use mi_builder in iris_load_indirect_location()

For example, this allows us to take advantage of command-streamer
based register offsets in mi_builder.

Ref: 06cf838cbdc ("intel/mi_builder: Support gen11 command-streamer based register offsets")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13652>

2 years agoRevert "gallium/u_blitter: work around broken sample shading in llvmpipe and zink"
Mike Blumenkrantz [Thu, 4 Nov 2021 16:53:41 +0000 (12:53 -0400)]
Revert "gallium/u_blitter: work around broken sample shading in llvmpipe and zink"

This reverts commit 8b287c3f925121d9389df9846024d9c350cbb235.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13679>

2 years agogallivm: handle TGSI SampleId sysval
Mike Blumenkrantz [Thu, 4 Nov 2021 16:58:13 +0000 (12:58 -0400)]
gallivm: handle TGSI SampleId sysval

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13679>

2 years agolavapipe: add some asserts for descriptor dynamic offsets
Mike Blumenkrantz [Thu, 4 Nov 2021 15:43:56 +0000 (11:43 -0400)]
lavapipe: add some asserts for descriptor dynamic offsets

ensure that this explodes if there aren't enough offsets

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13677>

2 years agozink: rework cached fbfetch descriptor fallback
Mike Blumenkrantz [Thu, 4 Nov 2021 15:24:05 +0000 (11:24 -0400)]
zink: rework cached fbfetch descriptor fallback

this ended up being a little trickier than I thought; lazy
descriptors don't use dynamic ubo types for the push set,
which means drivers that (correctly) assert dynamic offset existence
explode because the descriptor template will never work with the
push set

the better, though slightly more annoying, option here is to use the
lazy manager's faster descriptor allocation and lesser complexity to
quickly grab a push set, then tweak the existing cached codepath slightly
in order to update a raw vkdescriptorset

Fixes: 417477f60ed ("zink: always use lazy (non-push) updating for fbfetch descriptors")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13677>

2 years agod3d12: Don't accumulate timestamp queries
Jesse Natalie [Sat, 18 Sep 2021 01:53:02 +0000 (18:53 -0700)]
d3d12: Don't accumulate timestamp queries

If an app re-issues a timestamp query a lot, but doesn't ever ask
for the results, we could end up running off the end of our query
heap. But we don't actually need to advance/accumulate, so just
use a single entry in the heap.

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12920>

2 years agofreedreno/ir3: Fix off-by-one in prefetch safety assert.
Emma Anholt [Wed, 3 Nov 2021 20:29:28 +0000 (13:29 -0700)]
freedreno/ir3: Fix off-by-one in prefetch safety assert.

This looks like just a typo, we allow up to == 0xf in the lowering pass.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668>

2 years agofreedreno/a5xx: Clean up a little bit of blitter array pitch setup.
Emma Anholt [Wed, 3 Nov 2021 20:15:45 +0000 (13:15 -0700)]
freedreno/a5xx: Clean up a little bit of blitter array pitch setup.

We have a nice helper function for determining an array pitch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668>

2 years agofreedreno/a5xx: Try to fix drawing to z/s miplevel/layer offsets.
Emma Anholt [Wed, 3 Nov 2021 19:27:21 +0000 (12:27 -0700)]
freedreno/a5xx: Try to fix drawing to z/s miplevel/layer offsets.

Terrifyingly, no testcases are fixed by this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668>

2 years agofreedreno/a5xx: Remove bogus assertion about BO size.
Emma Anholt [Thu, 4 Nov 2021 17:27:42 +0000 (10:27 -0700)]
freedreno/a5xx: Remove bogus assertion about BO size.

The slice->size0 temp is being used as both the array stride (incorrectly)
and as the size of the slice (for this assert).  This assert doesn't seem
to be in the right place to me, if you want to check that offset+slice
size is < bo size, you could just do that at the end of layout setup.

This caused troubles when fixing the temp to be the actual array stride
for filling out the HW state, since then rendering to nonzero levels would
think that the rendering overflowed the BO when it doesn't.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668>

2 years agofreedreno/a6xx: Try to fix drawing to z/s miplevel/layer offsets.
Emma Anholt [Wed, 3 Nov 2021 19:21:18 +0000 (12:21 -0700)]
freedreno/a6xx: Try to fix drawing to z/s miplevel/layer offsets.

Terrifyingly, no testcases are fixed by this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668>

2 years agofreedreno/a5xx: Diff reduction in fd5_layout to fd6_layout.
Emma Anholt [Thu, 4 Nov 2021 16:21:18 +0000 (09:21 -0700)]
freedreno/a5xx: Diff reduction in fd5_layout to fd6_layout.

This should be exactly equivalent code, except for the is_3d "level <= 1"
which doesn't bring over 6c19d3733185 ("freedreno/a6xx: fix 3d tex
layout") due to it failing our unit tests where we compare to the blob's
behavior.  The layer_stride setup is pulling in what freedreno_resource.c
was doing after the layout setup, so we match fd6 and so that it could
potentially be checked in unit testing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668>

2 years agointel/blorp: Add option to emit packets that disable Mesh
Caio Oliveira [Thu, 29 Apr 2021 22:10:57 +0000 (15:10 -0700)]
intel/blorp: Add option to emit packets that disable Mesh

If a driver doesn't support Mesh, don't emit anything.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13660>

2 years agointel/dev: Add an intel_device_info::has_mesh_shading bit
Caio Oliveira [Wed, 7 Jul 2021 19:41:57 +0000 (12:41 -0700)]
intel/dev: Add an intel_device_info::has_mesh_shading bit

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13660>

2 years agointel/decoder: Dump Task/Mesh shaders
Marcin Ślusarz [Thu, 29 Jul 2021 13:20:15 +0000 (15:20 +0200)]
intel/decoder: Dump Task/Mesh shaders

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13657>

2 years agointel/genxml: Inline the BODY structs into the instructions
Caio Oliveira [Thu, 20 May 2021 18:46:37 +0000 (11:46 -0700)]
intel/genxml: Inline the BODY structs into the instructions

Follows the convention used in other instructions.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13657>

2 years agointel/genxml: Add Mesh Shading structures
Caio Oliveira [Wed, 10 Feb 2021 04:07:38 +0000 (20:07 -0800)]
intel/genxml: Add Mesh Shading structures

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13657>

2 years agou_prim_restart: Fix index scanning with start offset
Jesse Natalie [Thu, 4 Nov 2021 16:45:12 +0000 (09:45 -0700)]
u_prim_restart: Fix index scanning with start offset

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13681>

2 years agoaux/primconvert: handle singular incomplete restarts
Mike Blumenkrantz [Mon, 1 Nov 2021 16:48:39 +0000 (12:48 -0400)]
aux/primconvert: handle singular incomplete restarts

if no restart indices are found, this draw must be discarded to avoid
crashing later on

Fixes: 583070748cb ("util/primconvert: handle rewriting of prim-restart draws with unsupported primtype")

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13630>

2 years agofreedreno/a5xx+: Fix missing LA formats.
Emma Anholt [Wed, 3 Nov 2021 22:11:39 +0000 (15:11 -0700)]
freedreno/a5xx+: Fix missing LA formats.

GL_ARB_texture_buffer_object uses these formats, and we expose it.  Since
we didn't have the formats in the table, we we were using bad HW
texture/color formats for them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13666>

2 years agofreedreno/a6xx: Don't try to generate mipmaps for SNORM with our blitter.
Emma Anholt [Wed, 3 Nov 2021 22:59:52 +0000 (15:59 -0700)]
freedreno/a6xx: Don't try to generate mipmaps for SNORM with our blitter.

Since we're casting to unorm, the linear filtering will give bad results.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13666>

2 years agointel: Add has_bit6_swizzle to devinfo
Jason Ekstrand [Tue, 2 Nov 2021 20:49:27 +0000 (15:49 -0500)]
intel: Add has_bit6_swizzle to devinfo

There's no good reason to have this rather complex check in three
drivers.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13636>

2 years agovbo: utilize structure padding to optimize indirection cold->prims[0].begin
Marek Olšák [Fri, 29 Oct 2021 07:09:47 +0000 (03:09 -0400)]
vbo: utilize structure padding to optimize indirection cold->prims[0].begin

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13589>

2 years agoradeonsi: increase tc_max_cpu_storage_size
Marek Olšák [Sat, 30 Oct 2021 16:23:38 +0000 (12:23 -0400)]
radeonsi: increase tc_max_cpu_storage_size

Viewperf benefits. The number is only slightly above the size we need.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603>

2 years agoradeonsi: fix a typo preventing a fast depth-stencil clear
Marek Olšák [Sat, 30 Oct 2021 15:43:42 +0000 (11:43 -0400)]
radeonsi: fix a typo preventing a fast depth-stencil clear

Fixes: 9defe8aca953b69615728c8 - radeonsi: implement fast Z/S clears using clear_buffer on HTILE

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603>

2 years agoradeonsi: allow and finish TC-compatible MSAA HTILE
Marek Olšák [Fri, 29 Oct 2021 19:36:05 +0000 (15:36 -0400)]
radeonsi: allow and finish TC-compatible MSAA HTILE

This improves perf for Catia by 4%.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603>

2 years agoradeonsi: rename stencil_cleared_level_mask -> stencil_cleared_level_mask_once
Marek Olšák [Fri, 29 Oct 2021 17:22:43 +0000 (13:22 -0400)]
radeonsi: rename stencil_cleared_level_mask -> stencil_cleared_level_mask_once

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603>

2 years agoradeonsi: add a faster clear path for glClearTexImage
Marek Olšák [Fri, 29 Oct 2021 18:02:53 +0000 (14:02 -0400)]
radeonsi: add a faster clear path for glClearTexImage

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603>

2 years agoradeonsi: fix 2 issues with depth_cleared_level_mask
Marek Olšák [Fri, 29 Oct 2021 17:27:54 +0000 (13:27 -0400)]
radeonsi: fix 2 issues with depth_cleared_level_mask

- Unset depth_cleared_level_mask for non-clear blits. Set the flag after
  the clear, so that we don't have to check blitter_running.
- Set depth_cleared_level_mask only when we set depth_clear_value.

Fixes: ff8a930cf7de6aa7 - radeonsi: add _once suffix to depth_cleared_level_mask

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603>

2 years agovulkan/wsi: implement missing wsi_register_device_event
Tapani Pälli [Mon, 1 Nov 2021 05:31:19 +0000 (07:31 +0200)]
vulkan/wsi: implement missing wsi_register_device_event

These changes implement vkRegisterDeviceEventEXT and detection of
monitor hotplug. Wsi launches a thread that listens to udev events and
signals the appropriate device fences when hotplug hapens.

v2: use wsi fences instead of syncobj api (Jason Ekstrand)
v3: refactor + cleanups, create thread on demand (Samuel Pitoiset)
v4: bring back syncobj support from initial version for radv
v5: make libudev dependency optional, check for poll errors (Simon Ser)
v6: change matching mechanism to use udev device node instead of path
v7: remove the matching mechanism
v8: fix a race with thread creation + use single mutex + other cleanups
    (Jason Ekstrand)

Fixes:
   dEQP-VK.wsi.display_control.register_device_event

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12305>

2 years agoanv: setup syncobj fd via wsi_device_setup_syncobj_fd
Tapani Pälli [Thu, 14 Oct 2021 11:45:19 +0000 (14:45 +0300)]
anv: setup syncobj fd via wsi_device_setup_syncobj_fd

Patch moves initialization of variable so that we have fd when calling
wsi initialization.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12305>

2 years agoradv: setup syncobj fd via wsi_device_setup_syncobj_fd
Tapani Pälli [Thu, 14 Oct 2021 11:44:41 +0000 (14:44 +0300)]
radv: setup syncobj fd via wsi_device_setup_syncobj_fd

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12305>

2 years agovulkan/wsi: provide api for drivers to setup syncobj fd
Tapani Pälli [Thu, 14 Oct 2021 11:43:00 +0000 (14:43 +0300)]
vulkan/wsi: provide api for drivers to setup syncobj fd

Drivers that import sync_fd to the wsi fences can use this to set file
descriptor for syncobj related calls. This fixes permission errors when
registering display/device events and importing sync_fd from driver
side.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12305>

2 years agozink: add khr46 to ci
Mike Blumenkrantz [Wed, 3 Nov 2021 16:00:36 +0000 (12:00 -0400)]
zink: add khr46 to ci

this blocks out all the very long tests and marks failures as needed
to improve the coverage of ci

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13656>

2 years agozink: remove lazy ci job
Mike Blumenkrantz [Wed, 3 Nov 2021 19:41:40 +0000 (15:41 -0400)]
zink: remove lazy ci job

the push descriptor coverage for lavapipe should be okay in ci now, and
that was the point of adding this job

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13656>

2 years agonvc0: Fix uninitialized width/height/depth warning.
Joshua Ashton [Tue, 21 Sep 2021 10:10:05 +0000 (11:10 +0100)]
nvc0: Fix uninitialized width/height/depth warning.

This can happen if view->resource is false.

Fixes a warning in GCC 9+ that's been bugging me for a very long time when building Mesa.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12955>

2 years agogallium/u_blitter: work around broken sample shading in llvmpipe and zink
Marek Olšák [Thu, 4 Nov 2021 13:56:49 +0000 (09:56 -0400)]
gallium/u_blitter: work around broken sample shading in llvmpipe and zink

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13602>

2 years agogallium/u_blitter: do MSAA copies in 1 pass using sample shading
Marek Olšák [Fri, 29 Oct 2021 15:56:52 +0000 (11:56 -0400)]
gallium/u_blitter: do MSAA copies in 1 pass using sample shading

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13602>

2 years agogallium/u_blitter: disable sample shading for all blits
Marek Olšák [Fri, 29 Oct 2021 14:59:51 +0000 (10:59 -0400)]
gallium/u_blitter: disable sample shading for all blits

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13602>

2 years agogallium/util: fix util_can_blit_via_copy_region with unbound render condition
Marek Olšák [Fri, 29 Oct 2021 13:40:28 +0000 (09:40 -0400)]
gallium/util: fix util_can_blit_via_copy_region with unbound render condition

It returned false when a render condition was not bound, but it should
have returned true.

The bool stuff is random and incomplete, but that's life.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13602>

2 years agozink: clamp PIPE_SHADER_CAP_MAX_INPUTS for xfb
Mike Blumenkrantz [Mon, 1 Nov 2021 14:44:59 +0000 (10:44 -0400)]
zink: clamp PIPE_SHADER_CAP_MAX_INPUTS for xfb

vertex shader stages that can produce xfb must have
their input size clamped to the compiler define MAX_VARYING
to successfully be able to export an xfb output for each input

fixes KHR-GL46.geometry_shader.limits.max_input_components

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13632>

2 years agozink: do a better job conserving locations for packed xfb outputs
Mike Blumenkrantz [Mon, 1 Nov 2021 17:13:31 +0000 (13:13 -0400)]
zink: do a better job conserving locations for packed xfb outputs

if an entire vec4 is exported to xfb, mark it as an explicit xfb buffer
whenever possible to avoid blowing out the location limit

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13632>

2 years agodrirc: add options for BETA CAE Ansa application.
Pierre-Eric Pelloux-Prayer [Tue, 12 Oct 2021 09:54:46 +0000 (11:54 +0200)]
drirc: add options for BETA CAE Ansa application.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13364>

2 years agodrirc: add mesa_extension_override option
Pierre-Eric Pelloux-Prayer [Tue, 12 Oct 2021 09:53:28 +0000 (11:53 +0200)]
drirc: add mesa_extension_override option

This allows specific per-application override.
The existing MESA_EXTENSION_OVERRIDE env variable is kept.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13364>

2 years agomesa/init: replace call_once with manual implementation
Pierre-Eric Pelloux-Prayer [Tue, 12 Oct 2021 09:52:22 +0000 (11:52 +0200)]
mesa/init: replace call_once with manual implementation

This will be useful to add parameters to one_time_init().

_MTX_INITIALIZER_NP and Windows don't play nice together,
so I had to keep a call_once() to initialize the mutex.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13364>

2 years agomesa: don't use dummy_true for some MESA extensions
Pierre-Eric Pelloux-Prayer [Tue, 12 Oct 2021 09:50:15 +0000 (11:50 +0200)]
mesa: don't use dummy_true for some MESA extensions

Otherwise we can't use MESA_EXTENSION_OVERRIDE, or rather: disabling one
extension using dummy_true will disable all others.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13364>

2 years agomesa: print a warning when an extension can't be disabled
Pierre-Eric Pelloux-Prayer [Fri, 15 Oct 2021 07:25:44 +0000 (09:25 +0200)]
mesa: print a warning when an extension can't be disabled

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13364>

2 years agobroadcom/compiler: copy packing when converting add to mul
Iago Toral Quiroga [Thu, 4 Nov 2021 12:41:20 +0000 (13:41 +0100)]
broadcom/compiler: copy packing when converting add to mul

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13675>

2 years agoradv: Use MESA_VULKAN_SHADER_STAGES to make room for mesh/task.
Timur Kristóf [Tue, 19 Oct 2021 15:37:55 +0000 (17:37 +0200)]
radv: Use MESA_VULKAN_SHADER_STAGES to make room for mesh/task.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13440>

2 years agollvmpipe: add missing NIR alu-op handling
Pierre-Eric Pelloux-Prayer [Wed, 6 Oct 2021 12:50:09 +0000 (14:50 +0200)]
llvmpipe: add missing NIR alu-op handling

nir_op_bcsel implemented based on ac_nir_to_llvm.c emit_bcsel function.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13246>

2 years agomesa: enable force_direct_glx_context for DiscoveryStudio2020
Pierre-Eric Pelloux-Prayer [Wed, 6 Oct 2021 12:49:01 +0000 (14:49 +0200)]
mesa: enable force_direct_glx_context for DiscoveryStudio2020

This app uses Qt4.8 which uses an indirect context to save a GL scene to
a pixmap.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13246>

2 years agoglx/drirc: add a force_direct_glx_context option
Pierre-Eric Pelloux-Prayer [Thu, 7 Oct 2021 10:14:44 +0000 (12:14 +0200)]
glx/drirc: add a force_direct_glx_context option

Some applications may request an indirect context but this feature is
disabled by default on Xorg and thus context creation will fail.

This commit adds a drirc setting to force the creation of direct glx
context, regardless of what the app is requesting.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13246>

2 years agovbo/dlist: free copied.buffer if no vertices were copied
Pierre-Eric Pelloux-Prayer [Mon, 4 Oct 2021 09:18:47 +0000 (11:18 +0200)]
vbo/dlist: free copied.buffer if no vertices were copied

Other parts of the code asserts that copied.buffer is NULL if there are
no vertices to copy.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13246>

2 years agodriconf: set vblank_mode=0 for viewperf2020
Marek Olšák [Sun, 31 Oct 2021 07:55:23 +0000 (03:55 -0400)]
driconf: set vblank_mode=0 for viewperf2020

It doesn't disable vsync. Reported internally.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13612>

2 years agoac/surface: don't validate DCC settings if DCC isn't possible
Pierre-Eric Pelloux-Prayer [Wed, 3 Nov 2021 14:26:21 +0000 (15:26 +0100)]
ac/surface: don't validate DCC settings if DCC isn't possible

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550>

2 years agoradeonsi: fix ps_uses_fbfetch value
Pierre-Eric Pelloux-Prayer [Fri, 29 Oct 2021 13:12:50 +0000 (15:12 +0200)]
radeonsi: fix ps_uses_fbfetch value

si_update_ps_colorbuf0_slot used blitter_running as a way to detect
recursive calls.
Unfortunately this catch too many cases; for instance a backtrace
like:
  #0 si_update_ps_colorbuf0_slot
  #1 si_set_framebuffer_state
  #2 do_blits
  [...]
  #5 si_blit
  #6 si_copy_region_with_blit

Would end-up not updating ps_uses_fbfetch; so if the new fb_state is
something like:
  cbufs = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, zsbuf = 0x55b8987545e0}

We can have ps_uses_fbfetch=true but cbufs[0] = NULL, which causes a
crash later in si_ps_key_update_framebuffer.

This commit fixes intermittent crashes in KHR-GL46.stencil_texturing.functional.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550>

2 years agoradeonsi/sdma: fix bogus assert
Pierre-Eric Pelloux-Prayer [Thu, 28 Oct 2021 09:56:01 +0000 (11:56 +0200)]
radeonsi/sdma: fix bogus assert

src can use dcc even for non sdma v5 variants because si_decompress_dcc
is called in si_sdma_copy_image.

Fixes: 46c95047bd7 ("radeonsi: implement si_sdma_copy_image for gfx7+")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550>

2 years agoac/surface: use a less strict condition in is_dcc_supported_by_L2
Pierre-Eric Pelloux-Prayer [Wed, 27 Oct 2021 12:51:23 +0000 (14:51 +0200)]
ac/surface: use a less strict condition in is_dcc_supported_by_L2

While Mesa chooses to always use independent_128B_blocks, other drivers
can make different choices.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550>

2 years agoradeonsi: treat nir_intrinsic_load_constant as a VMEM operation
Pierre-Eric Pelloux-Prayer [Wed, 27 Oct 2021 12:44:54 +0000 (14:44 +0200)]
radeonsi: treat nir_intrinsic_load_constant as a VMEM operation

This is used by variable indexing of constant arrays, to build
code like this:

   s_add_u32 s6, s6, const_data@rel32@lo+4
   s_addc_u32 s7, s7, const_data@rel32@hi+12
   [...]
   global_load_dword v4, v4, s[6:7

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5118
Fixes: 8288882965b ("radeonsi: set MEM_ORDERED optimally")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550>

2 years agoradv: Split off cmd_buffer variant of descriptor set template updates
Joshua Ashton [Wed, 13 Oct 2021 14:44:54 +0000 (15:44 +0100)]
radv: Split off cmd_buffer variant of descriptor set template updates

Assumes cmd_buffer != NULL for this path to eliminate the checks in the generic code.

Benchmarks:

I made a microbenchmark based on Bas' vulkan microbench suite.

https://gitlab.freedesktop.org/bnieuwenhuizen/vulkan_microbench/-/merge_requests/1

In this benchmark, this improves vkDescriptorTemplateUpdate performance consistently by 36%.

-------------------------------------------------------------------
Benchmark                         Time             CPU   Iterations
-------------------------------------------------------------------
DescriptorTemplateUpdate       81.2 ns         81.2 ns      8573169

->

-------------------------------------------------------------------
Benchmark                         Time             CPU   Iterations
-------------------------------------------------------------------
DescriptorTemplateUpdate       52.9 ns         52.9 ns     13306065

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13342>

2 years agoradv: Split off cmd_buffer variant of descriptor set updates
Joshua Ashton [Thu, 14 Oct 2021 12:15:51 +0000 (13:15 +0100)]
radv: Split off cmd_buffer variant of descriptor set updates

Assumes cmd_buffer != NULL for this path to eliminate the checks in the generic code.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13342>

2 years agoradv: Always inline descriptor writes
Joshua Ashton [Wed, 13 Oct 2021 14:08:39 +0000 (15:08 +0100)]
radv: Always inline descriptor writes

Improves performance, see next commit for benchmarks.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13342>

2 years agofreedreno/a618: Mark a flaky test that triggers hangcheck.
Emma Anholt [Thu, 4 Nov 2021 02:12:19 +0000 (19:12 -0700)]
freedreno/a618: Mark a flaky test that triggers hangcheck.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13659>

2 years agofreedreno/a5xx: Use the defined names for 2D_BLIT_CNTL regs.
Emma Anholt [Wed, 3 Nov 2021 18:27:59 +0000 (11:27 -0700)]
freedreno/a5xx: Use the defined names for 2D_BLIT_CNTL regs.

We have definitions for them above, no need to be UNKNOWN about it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13659>

2 years agofreedreno/a6xx: Fix partial z/s clears with sysmem.
Emma Anholt [Wed, 3 Nov 2021 16:51:26 +0000 (09:51 -0700)]
freedreno/a6xx: Fix partial z/s clears with sysmem.

We have to set 8c01 to say "leave these channels alone" when
clearing/storing just Z or S of z24s8.  Fixes the bypass path for
KHR-GLES3.packed_depth_stencil.verify_read_pixels.depth24_stencil8.

Cc: mesa-stable
Fixes: #5592
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13659>

2 years agofeatures: add dynamic render for lavapipe
Mike Blumenkrantz [Wed, 3 Nov 2021 23:54:32 +0000 (19:54 -0400)]
features: add dynamic render for lavapipe

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13627>

2 years agolavapipe: VK_KHR_dynamic_rendering
Mike Blumenkrantz [Mon, 4 Oct 2021 18:56:31 +0000 (14:56 -0400)]
lavapipe: VK_KHR_dynamic_rendering

this is a conformant implementation

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13627>

2 years agolavapipe: fix cmd queuing for dynamic render
Mike Blumenkrantz [Mon, 4 Oct 2021 18:56:13 +0000 (14:56 -0400)]
lavapipe: fix cmd queuing for dynamic render

this sucks, but it should be sorted quickly in #5440

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13627>

2 years agovk: update headers for 1.2.197
Mike Blumenkrantz [Tue, 2 Nov 2021 12:59:52 +0000 (08:59 -0400)]
vk: update headers for 1.2.197

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13627>

2 years agofreedreno/ir3: Use immediate for flat.b's src1
Matt Turner [Tue, 19 Oct 2021 19:39:13 +0000 (12:39 -0700)]
freedreno/ir3: Use immediate for flat.b's src1

According to Jonathan Marek:

  Only one immediate can be decoded in a cat2 instruction (if both srcs
  are immediates, they will use the value of the either the first or
  second one, I don't remember which) - using 2 immediates in a cat2
  instruction is only "correct" if they are both equal.

  The (i,j) in the second src of flat.b is not unused, but behaves as 0
  for any (small) integer because it is a float src. The hack I
  suggested is to set the second src equal to (immediate) first src,
  which seems to work.

This allows us to remove a couple of mov instructions or a bit of extra
constfile usage.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13558>

2 years agofreedreno/ir3: Use flat.b to load flat varyings on a6xx
Matt Turner [Tue, 12 Oct 2021 15:50:55 +0000 (08:50 -0700)]
freedreno/ir3: Use flat.b to load flat varyings on a6xx

The flat.b/bary.f cat2 instruction should be faster than an ldlv cat6
instruction, even with a couple of additional moves (which will be
removed in the next patch).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13558>

2 years agofreedreno/ir3: Add infrastructure for flat.b
Matt Turner [Mon, 1 Nov 2021 23:12:40 +0000 (16:12 -0700)]
freedreno/ir3: Add infrastructure for flat.b

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13558>

2 years agoir3: Add support for (dis)assembling flat.b
Matt Turner [Tue, 13 Apr 2021 19:36:33 +0000 (19:36 +0000)]
ir3: Add support for (dis)assembling flat.b

flat.b is a variant of the bary.f instruction that does not perform
interpolation of the varying input.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13558>

2 years agozink: always use lazy (non-push) updating for fbfetch descriptors
Mike Blumenkrantz [Wed, 3 Nov 2021 19:03:30 +0000 (15:03 -0400)]
zink: always use lazy (non-push) updating for fbfetch descriptors

fbfetch descriptors are uncacheable due to having mixed descriptor types
in the same set, so this needs to always use lazy updating to avoid
exploding the cache and crashing

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13654>

2 years agozink: set fbfetch state on lazy batch data when enabling it
Mike Blumenkrantz [Wed, 3 Nov 2021 19:03:59 +0000 (15:03 -0400)]
zink: set fbfetch state on lazy batch data when enabling it

this avoids creating new descriptor pools on every update

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13654>

2 years agoanv: disable debug logging spam
Mike Blumenkrantz [Tue, 26 Oct 2021 17:27:19 +0000 (13:27 -0400)]
anv: disable debug logging spam

nobody wants to see this by default, so disable it until #5404
is resolved to make it more manageable

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13628>

2 years agomesa/st: lower psiz for shader precompile
Mike Blumenkrantz [Wed, 23 Jun 2021 16:44:12 +0000 (12:44 -0400)]
mesa/st: lower psiz for shader precompile

if the driver is requesting that psiz always be set, precompile the first
variant with psiz since that's most likely to be what's eventually used

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13588>

2 years agomesa/st: rework psiz lowering
Mike Blumenkrantz [Wed, 23 Jun 2021 16:40:47 +0000 (12:40 -0400)]
mesa/st: rework psiz lowering

the context flag is immutable, and it's set by drivers that always
require the shader to export a psiz value for rasterization

"always" is all cases except GL_VERTEX_PROGRAM_POINT_SIZE being
enabled, in which case it should be assumed that the shader already
writes it, and no changes should be made

thus the shader key value can be changed to reflect that, when set,
it requires the shader to export a psiz value if it doesn't already

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13588>

2 years agodocs: update calendar for 21.3.0-rc4
Eric Engestrom [Wed, 3 Nov 2021 22:14:02 +0000 (22:14 +0000)]
docs: update calendar for 21.3.0-rc4

Add another release candidate as we're not ready for 21.3.0 final just yet.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13667>

2 years agost/mesa: don't update vertex elements when GL doesn't change them
Marek Olšák [Sun, 24 Oct 2021 07:57:14 +0000 (03:57 -0400)]
st/mesa: don't update vertex elements when GL doesn't change them

We rely on mesa/main to tell us whether to update vertex elements.
This decreases overhead for obvious reasons.

The select/feedback code path doesn't use this, which is why you see
unconditional "ALL" in a few codepaths.

This sequence of GL calls doesn't update vertex elements if only
the pointer and stride vary:
    glVertexPointer()
    glDrawElements()
    glVertexPointer()
    glDrawElements()
    glVertexPointer()
    glDrawElements()

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13512>

2 years agocso: add missing parameters into cso_set_vertex_buffers
Marek Olšák [Sun, 24 Oct 2021 07:56:29 +0000 (03:56 -0400)]
cso: add missing parameters into cso_set_vertex_buffers

they will be used later

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13512>

2 years agomesa: add NewVertexBuffers/NewVertexElements flags to indicate state changes
Marek Olšák [Sun, 24 Oct 2021 07:28:53 +0000 (03:28 -0400)]
mesa: add NewVertexBuffers/NewVertexElements flags to indicate state changes

This splits the per-VAO NewArrays flag into NewVertexBuffers and
NewVertexElements, and adds a global NewVertexElements flag to be used
by drivers.

This allows gallium to skip updating vertex elements when only vertex
buffers need to be updated.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13512>

2 years agomesa: change gl_vertex_array_object::NewArrays to bool
Marek Olšák [Sun, 24 Oct 2021 21:46:09 +0000 (17:46 -0400)]
mesa: change gl_vertex_array_object::NewArrays to bool

the individual bits are never used

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13512>