platform/upstream/mesa.git
2 years agodraw: asst. clean-ups in draw_context.[ch]
Brian Paul [Wed, 5 Oct 2022 18:23:06 +0000 (12:23 -0600)]
draw: asst. clean-ups in draw_context.[ch]

Fix whitespace/formatting for consistency.  Move var decls to where
they're first used, etc.

Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19024>

2 years agoradv: Consider inactive internal nodes never in the tree.
Bas Nieuwenhuizen [Tue, 11 Oct 2022 10:51:05 +0000 (12:51 +0200)]
radv: Consider inactive internal nodes never in the tree.

Since the parent doesn't know to signal it.

Fixes: e83e4fafc84 ("radv: Only emit parents from parents that actually end up in the tree.")
Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19033>

2 years agoturnip: Add perf debug for more UBWC-disable cases that we could support.
Emma Anholt [Thu, 6 Oct 2022 19:01:03 +0000 (12:01 -0700)]
turnip: Add perf debug for more UBWC-disable cases that we could support.

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

2 years agoturnip: Add perf_debug for UBWC being disabled due to mutable formats.
Emma Anholt [Wed, 31 Aug 2022 19:23:43 +0000 (12:23 -0700)]
turnip: Add perf_debug for UBWC being disabled due to mutable formats.

I suspect this is going to be a popular perf issue for zink and angle.  I
keep having to print out format lists for debug.

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

2 years agoturnip: Move the ubwc_possible check before mutable formats.
Emma Anholt [Thu, 6 Oct 2022 17:42:22 +0000 (10:42 -0700)]
turnip: Move the ubwc_possible check before mutable formats.

I'm going to add some perf debug about mutable formats, and I don't want
to warn when UBWC would be impossible anyway.

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

2 years agoturnip: Add a perf_debug for feedback-related performance traps.
Emma Anholt [Mon, 3 Oct 2022 22:50:33 +0000 (15:50 -0700)]
turnip: Add a perf_debug for feedback-related performance traps.

This can show up in layering drivers.

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

2 years agozink: Decorate mediump outputs as RelaxedPrecision.
Emma Anholt [Tue, 4 Oct 2022 21:00:07 +0000 (14:00 -0700)]
zink: Decorate mediump outputs as RelaxedPrecision.

The NIR lowering for mediump can sometimes detect stores of 16-bit values
and demote the outputs, but even better is to have them decorated properly
in the first place.  Fixes a bunch of full-precision outputs in gfxbench
Aztec Ruins.

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

2 years agozink: Fix RelaxedPrecision decoration of texture samples.
Emma Anholt [Tue, 20 Sep 2022 21:55:19 +0000 (14:55 -0700)]
zink: Fix RelaxedPrecision decoration of texture samples.

You can't do it unless GL called the sampler mediump.  Also, the spirv
says "For image-sampling operations, decorations can appear on both the
sampling instruction and the image variable being sampled.  If either is
decorated, they both should be decorated, and if both are decorated their
decorations must match. If only one is decorated, the sampling instruction
can behave either as if both were decorated or neither were decorated." so
emit it on the declaration too.

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

2 years agoci/zink: Add some more flakes for turnip.
Emma Anholt [Wed, 5 Oct 2022 18:23:58 +0000 (11:23 -0700)]
ci/zink: Add some more flakes for turnip.

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

2 years agoradv: Implement pipeline-wide skiptriangles/skipaabbs.
Bas Nieuwenhuizen [Tue, 11 Oct 2022 01:12:15 +0000 (03:12 +0200)]
radv: Implement pipeline-wide skiptriangles/skipaabbs.

Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19030>

2 years agoradv: always re-emit patch control points when a pipeline with tess is bound
Samuel Pitoiset [Mon, 10 Oct 2022 15:16:09 +0000 (17:16 +0200)]
radv: always re-emit patch control points when a pipeline with tess is bound

We already re-emit this state when it's static. It could be dirtied
conditionally but the number of parameters to check is not worth it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7457
Fixes: eef1511437a ("radv: implement dynamic patch control points")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19021>

2 years agozink: add ZINK_DEBUG=shaderdb
Mike Blumenkrantz [Wed, 5 Oct 2022 15:57:39 +0000 (11:57 -0400)]
zink: add ZINK_DEBUG=shaderdb

this should enable shader-db support with zink

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

2 years agozink: implement async gfx precompile
Mike Blumenkrantz [Thu, 22 Sep 2022 20:42:19 +0000 (16:42 -0400)]
zink: implement async gfx precompile

the pipe_context::link_shader hook is called when shaders are
linked into a program by the application

by leveraging this, it becomes possible to utilize the existing
graphics pipeline library to implement precompilation
by creating a partial pipeline containing only the shader stages
and then adding in the vertex input and fragment output stages
dynamically using the fast-link feature

if all goes well, and if the vulkan driver's fast-linking is
truly fast, the full pipeline should be dynamically combined
in time to avoid stuttering, and an optimized variant will be
queued for async compile to be used the next time the pipeline
triggers a draw

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

2 years agozink: change zink_gfx_program::last_pipeline -> struct zink_gfx_pipeline_cache_entry
Mike Blumenkrantz [Sun, 2 Oct 2022 12:13:45 +0000 (08:13 -0400)]
zink: change zink_gfx_program::last_pipeline -> struct zink_gfx_pipeline_cache_entry

this ensures that the latest version of the pipeline pointer in the cache
entry will always be used

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

2 years agozink: gfx_pipeline_cache_entry -> zink_gfx_pipeline_cache_entry
Mike Blumenkrantz [Sun, 2 Oct 2022 12:11:30 +0000 (08:11 -0400)]
zink: gfx_pipeline_cache_entry -> zink_gfx_pipeline_cache_entry

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

2 years agozink: allow creating full pipelines unoptimized
Mike Blumenkrantz [Fri, 23 Sep 2022 16:26:27 +0000 (12:26 -0400)]
zink: allow creating full pipelines unoptimized

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

2 years agoanv: toggle on EXT_extended_dynamic_state3
Tapani Pälli [Sun, 4 Sep 2022 16:38:10 +0000 (19:38 +0300)]
anv: toggle on EXT_extended_dynamic_state3

This enabled the extension and toggles on supported features.

v2: set false to non-supported features (Lionel)
    add dynamic sample mask (Tapani)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic multisample sample mask
Tapani Pälli [Fri, 30 Sep 2022 05:11:26 +0000 (08:11 +0300)]
anv: dynamic multisample sample mask

This affects following packets:

  3DSTATE_SAMPLE_MASK

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic color blend equation
Tapani Pälli [Thu, 29 Sep 2022 14:15:06 +0000 (17:15 +0300)]
anv: dynamic color blend equation

This affects following packets:

  BLEND_STATE_ENTRY
  3DSTATE_PS_BLEND

v2: move vk_to_intel_blend and vk_to_intel_blend_op,
    remove ps_blend merge (Lionel)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic color write mask
Tapani Pälli [Sun, 4 Sep 2022 16:32:15 +0000 (19:32 +0300)]
anv: dynamic color write mask

This affects following packets:

  3DSTATE_BLEND_STATE_POINTERS

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic provoking vertex mode
Tapani Pälli [Sun, 4 Sep 2022 16:31:09 +0000 (19:31 +0300)]
anv: dynamic provoking vertex mode

This affects following packets:

  3DSTATE_CLIP
  3DSTATE_SF
  3DSTATE_STREAMOUT

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic states for depth clip and clamp
Tapani Pälli [Fri, 30 Sep 2022 04:45:54 +0000 (07:45 +0300)]
anv: dynamic states for depth clip and clamp

This change implements 3 states in one go:

  - depth clamp enable
  - depth clip enable
  - depth clip negative one to one

This affects following packets:

  3DSTATE_CLIP
  3DSTATE_VIEWPORT_STATE_POINTERS_CC
  3DSTATE_RASTER

v2: remove clip enable bit check from viewport emit (Lionel)
v3: use helper function from runtime to get depth clip (Lionel)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic alpha to one enable
Tapani Pälli [Sun, 4 Sep 2022 16:16:17 +0000 (19:16 +0300)]
anv: dynamic alpha to one enable

This affects following packets:

  BLEND_STATE

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic state for logic op enable
Tapani Pälli [Sun, 4 Sep 2022 16:14:40 +0000 (19:14 +0300)]
anv: dynamic state for logic op enable

This affects following packets:

  3DSTATE_PS_BLEND
  3DSTATE_BLEND_STATE_POINTERS

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic line rasterization mode
Tapani Pälli [Sun, 4 Sep 2022 16:12:21 +0000 (19:12 +0300)]
anv: dynamic line rasterization mode

This affects following packets:

  3DSTATE_RASTER

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic line stipple enable
Tapani Pälli [Sun, 4 Sep 2022 16:05:44 +0000 (19:05 +0300)]
anv: dynamic line stipple enable

This affects following packets:

  3DSTATE_WM

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic rasterization stream
Tapani Pälli [Sun, 4 Sep 2022 16:03:41 +0000 (19:03 +0300)]
anv: dynamic rasterization stream

This affects following packets:

  3DSTATE_STREAMOUT

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic state for tessellation domain origin
Tapani Pälli [Tue, 27 Sep 2022 16:20:25 +0000 (19:20 +0300)]
anv: dynamic state for tessellation domain origin

This affects following packets:

  3DSTATE_TE

v2: remove render target check, move cmd_emit_te and
    stop merging it, cleanups (Lionel)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoanv: dynamic state for polygon mode
Tapani Pälli [Sun, 4 Sep 2022 15:59:22 +0000 (18:59 +0300)]
anv: dynamic state for polygon mode

Remove 'polygon_mode' from pipeline and read it from
dynamic state instead.

This affects following packets:

  3DSTATE_CLIP
  3DSTATE_RASTER

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18879>

2 years agoac/nir/tess: Remove jump from tess factor writes.
Timur Kristóf [Mon, 15 Aug 2022 11:22:15 +0000 (13:22 +0200)]
ac/nir/tess: Remove jump from tess factor writes.

When the output patch size <= 32 we can be sure regardless
of wave size that each wave will take this branch, therefore
the jump can be removed.

Fossil DB stats on Navi 21:

Totals from 1385 (1.03% of 134906) affected shaders:
CodeSize: 2664436 -> 2658896 (-0.21%)
Instrs: 488618 -> 487233 (-0.28%)
Latency: 2290157 -> 2289199 (-0.04%)
InvThroughput: 898658 -> 898364 (-0.03%)
Branches: 6554 -> 5169 (-21.13%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-By: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17921>

2 years agoac/nir/ngg: Remove jumps from some branches where we know LGKMCNT==0.
Timur Kristóf [Sat, 6 Aug 2022 05:37:47 +0000 (07:37 +0200)]
ac/nir/ngg: Remove jumps from some branches where we know LGKMCNT==0.

The GPU can skip LDS instructions when LGKMCNT==0, and for these
branches this should be always faster than a jump.

Fossil DB stats on Navi 21:

Totals from 60918 (45.16% of 134906) affected shaders:
CodeSize: 158624792 -> 157893776 (-0.46%)
Instrs: 30234254 -> 30051500 (-0.60%)
Latency: 139521675 -> 139434597 (-0.06%); split: -0.06%, +0.00%
InvThroughput: 21184146 -> 21183653 (-0.00%); split: -0.00%, +0.00%
Branches: 1115134 -> 932380 (-16.39%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-By: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17921>

2 years agoaco: Allow explicitly removing jumps on GFX10+ when beneficial.
Timur Kristóf [Wed, 23 Feb 2022 09:13:54 +0000 (10:13 +0100)]
aco: Allow explicitly removing jumps on GFX10+ when beneficial.

"Removing jumps" in ACO means skipping the jump instruction
at the beginning of a divergent branch (but still modify exec).

ACO already supports implicitly removing jumps when it decides
that executing a branch with empty exec mask is more beneficial
than a jump.

This commit adds the possibility to use this explicitly
through nir_selection_control. ACO will respect this
setting and remove the branch instructions when this is specified,
unless it decides that this would cause bugs (eg. exp instruction).

There are two cases that benefit from the new change:

1. When the application requests to "flatten" a branch (ie.
remove control flow), we now respect that.
2. When the compiler stack determines that a divergent branch
is always taken.

v2 by Georg Lehmann: fixed applying sel_ctrl to else blocks

Fossil DB stats on Navi 21:

Totals from 13 (0.01% of 134906) affected shaders:
CodeSize: 136616 -> 136496 (-0.09%)
Instrs: 26196 -> 26166 (-0.11%)
Latency: 417928 -> 417889 (-0.01%)
Branches: 1241 -> 1211 (-2.42%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-By: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17921>

2 years agonir: Print nir_selection_control_divergent_always_taken.
Georg Lehmann [Mon, 10 Oct 2022 08:44:35 +0000 (10:44 +0200)]
nir: Print nir_selection_control_divergent_always_taken.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17921>

2 years agonir: Add selection control enum for always taken divergent branches.
Timur Kristóf [Wed, 7 Sep 2022 11:58:30 +0000 (13:58 +0200)]
nir: Add selection control enum for always taken divergent branches.

The new enum is called nir_selection_control_divergent_always_taken,
and it's almost the same as nir_selection_control_flatten.
The main difference between the two is that "flatten" represents
a choice made by the application but "divergent_always_taken" may
be applied by the compiler stack when it thinks this is beneficial.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-By: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17921>

2 years agonir: Document the flatten/dont_flatten selection control options.
Timur Kristóf [Wed, 7 Sep 2022 11:58:00 +0000 (13:58 +0200)]
nir: Document the flatten/dont_flatten selection control options.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-By: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17921>

2 years agod3d12: Fix get_index7bits - Reuse previously freed indices
Sil Vilerino [Mon, 3 Oct 2022 15:42:54 +0000 (11:42 -0400)]
d3d12: Fix get_index7bits - Reuse previously freed indices

Some apps do not always reuse resources contiguously and we need to search for a previous free index/slot

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18944>

2 years agod3d12: Add VP9 Decode support
Sil Vilerino [Fri, 30 Sep 2022 20:15:05 +0000 (16:15 -0400)]
d3d12: Add VP9 Decode support

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18944>

2 years agofrontends/va: Add VP9 decode ref/mode_deltas information
Sil Vilerino [Fri, 30 Sep 2022 20:14:52 +0000 (16:14 -0400)]
frontends/va: Add VP9 decode ref/mode_deltas information

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18944>

2 years agofrontends/va: Add VP9 decode multi slice information
Sil Vilerino [Fri, 30 Sep 2022 19:45:23 +0000 (15:45 -0400)]
frontends/va: Add VP9 decode multi slice information

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18944>

2 years agofrontends/va: fix av1 decoding image distortion issue
Ruijing Dong [Sat, 8 Oct 2022 02:03:20 +0000 (22:03 -0400)]
frontends/va: fix av1 decoding image distortion issue

problem:
when not using qmatrix, the qm_y, qm_u and qm_v value is set to 0,
which signals av1 decoder to use qmatix and causes confussion.

solution:
when not using qmatrix, set these values to 0xf.

fixed: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5632

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19002>

2 years agoanv, iris: Disable pre fetching the binding table entries on DG2
Rohan Garg [Tue, 6 Sep 2022 15:31:51 +0000 (17:31 +0200)]
anv, iris: Disable pre fetching the binding table entries on DG2

On DG2 the HW will fetch the binding entries into the cache
for every single thread when a compute walker is dispatched,
wiping out the advantages of the cache prefetch.

The spec also advises to not do a cache prefetch when we have more than
31 binding table entries, but most real world applications will never
hit that limit.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18498>

2 years agoradv: fix and rework shaders upload with GPL
Samuel Pitoiset [Thu, 22 Sep 2022 13:35:24 +0000 (15:35 +0200)]
radv: fix and rework shaders upload with GPL

For fast-linking, we really want to upload the binaries directly in
a library to avoid creating and uploading at pipeline creation time.

To achieve that, add a radeon_winsys_bo pointer to radv_shader in
order to indicate that a shader is already uploaded. When a lib is
imported, the pipeline slab BO is also incremented to make sure it's
not freed when the lib is destroyed.

This also allows to free binaries right after they are uploaded.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18860>

2 years agovk/graphics_state: don't set default sample locations if rast samples is dynamic
Mike Blumenkrantz [Fri, 30 Sep 2022 04:51:54 +0000 (00:51 -0400)]
vk/graphics_state: don't set default sample locations if rast samples is dynamic

dynamic rasterization samples got added late, and I forgot to update this

Fixes: 1deb83fb86d ("vulkan: Add more dynamic multisample states")

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18896>

2 years agoradv: add radv_zero_vram workarounds for OpenGL games
Timothy Arceri [Tue, 11 Oct 2022 02:42:25 +0000 (13:42 +1100)]
radv: add radv_zero_vram workarounds for OpenGL games

These are needed if the games are running on radv via zink.

Tested with "7 Days to Die"

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6449
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19031>

2 years agoiris: Add miplevel parameters to iris_resource_texture_aux_usage
Kenneth Graunke [Mon, 10 Oct 2022 21:58:40 +0000 (14:58 -0700)]
iris: Add miplevel parameters to iris_resource_texture_aux_usage

Sometimes we only access a subset of a texture's miplevels, for example
when peforming GenerateMipmaps().  We want to be able to look for the
aux state being ISL_AUX_STATE_PASS_THROUGH for only the relevant
miplevels, rather than all of them, when deciding whether to bypass aux.

Avoids another occurrence of issues with reading via aux while in
passthrough state (see issue #6558), fixing misrendering in Chrome
and Electron apps while resizing the window to be smaller (#7272).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7272
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19028>

2 years agomesa: mark debug variables with ASSERTED
Tapani Pälli [Mon, 10 Oct 2022 10:18:01 +0000 (13:18 +0300)]
mesa: mark debug variables with ASSERTED

To clean up compilation warnings about unused variables
when asserts are disabled.

v2: UNUSED -> ASSERTED (Eric Engestrom)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19016>

2 years agoanv: mark debug variables with ASSERTED
Tapani Pälli [Mon, 10 Oct 2022 10:17:37 +0000 (13:17 +0300)]
anv: mark debug variables with ASSERTED

To clean up compilation warnings about unused variables
when asserts are disabled.

v2: UNUSED -> ASSERTED (Eric Engestrom)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19016>

2 years agointel/fs: mark debug variables with ASSERTED
Tapani Pälli [Mon, 10 Oct 2022 10:16:44 +0000 (13:16 +0300)]
intel/fs: mark debug variables with ASSERTED

To clean up compilation warnings about unused variables
when asserts are disabled.

v2: UNUSED -> ASSERTED (Eric Engestrom)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19016>

2 years agoradv: Properly annotate all the invalid node usage.
Bas Nieuwenhuizen [Sat, 24 Sep 2022 18:56:38 +0000 (20:56 +0200)]
radv: Properly annotate all the invalid node usage.

Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18799>

2 years agoradv: Add traversal backtracking with a short stack.
Bas Nieuwenhuizen [Sat, 24 Sep 2022 12:56:06 +0000 (14:56 +0200)]
radv: Add traversal backtracking with a short stack.

So we can now work with arbitrarily deep BVHs.

Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18799>

2 years agoradv: Split global & local bvh node variable.
Bas Nieuwenhuizen [Sat, 24 Sep 2022 12:24:13 +0000 (14:24 +0200)]
radv: Split global & local bvh node variable.

Need the local id later for follow up work.

Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18799>

2 years agoradv: Only emit parents from parents that actually end up in the tree.
Bas Nieuwenhuizen [Sat, 1 Oct 2022 13:12:13 +0000 (15:12 +0200)]
radv: Only emit parents from parents that actually end up in the tree.

Otherwise the wrong parent link might be set.

This kinda relies on waves being launched in order which tends to
be the case on AMD. To avoid the busy-wait loop waiting on stuff
from the same subgroup we do the actual processing in the body of
the loop. This can have performance implications but mostly in the
case we'd otherwise deadlock, so meh.

Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18799>

2 years agoradv: Generate parent links in BVH.
Bas Nieuwenhuizen [Wed, 21 Sep 2022 19:53:57 +0000 (21:53 +0200)]
radv: Generate parent links in BVH.

Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18799>

2 years agoradv: Start the BVH after the header.
Bas Nieuwenhuizen [Wed, 21 Sep 2022 19:05:46 +0000 (21:05 +0200)]
radv: Start the BVH after the header.

First usage of the offset field, Can put more in it in the follow
up.

Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18799>

2 years agoradv: Simplify buffer copy address generation.
Bas Nieuwenhuizen [Wed, 21 Sep 2022 14:52:21 +0000 (16:52 +0200)]
radv: Simplify buffer copy address generation.

Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18799>

2 years agoradv: Add a field for the offset of the bvh in the blas.
Bas Nieuwenhuizen [Sat, 17 Sep 2022 13:23:35 +0000 (15:23 +0200)]
radv: Add a field for the offset of the bvh in the blas.

So that we can put some metadata in front.

Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18799>

2 years agoradv: Clean up unused fields in BVH IR.
Bas Nieuwenhuizen [Thu, 29 Sep 2022 12:29:37 +0000 (12:29 +0000)]
radv: Clean up unused fields in BVH IR.

Reviewed-By: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18799>

2 years agotu: Add compute shader instrlen workaround
Connor Abbott [Mon, 10 Oct 2022 16:11:57 +0000 (18:11 +0200)]
tu: Add compute shader instrlen workaround

It's a bit unfortunate that this doesn't match any blob workaround that
we know of, but it seems to be necessary.

Closes: #5892
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19023>

2 years agofreedreno: Add LABEL flush
Connor Abbott [Mon, 10 Oct 2022 15:40:12 +0000 (17:40 +0200)]
freedreno: Add LABEL flush

This seems like a debug thing, but the blob also seems to use it for
workarounds where an event is required but no actual work needs to be
done. For example CP_REG_WRITE uses it for various workarounds.

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

2 years agotu: Reset whether there is DS resolve for dynamic subpass
Danylo Piliaiev [Fri, 7 Oct 2022 14:52:41 +0000 (16:52 +0200)]
tu: Reset whether there is DS resolve for dynamic subpass

Otherwise we use old invalid value.

Relevant CTS tests:
 dEQP-VK.pipeline.monolithic.multisample.misc.dynamic_rendering.multi_renderpass.r8g8b8a8_unorm_r16g16b16a16_sfloat_r16g16b16a16_*

Fixes: ed125e6cca188275631641784fcf3ddcbcfef193
("tu: Initial support for dynamic rendering")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18999>

2 years agoiris: Set SamplerCount in shader packets
Jason Ekstrand [Wed, 6 Apr 2022 23:01:22 +0000 (18:01 -0500)]
iris: Set SamplerCount in shader packets

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18670>

2 years agoiris: bump IRIS_MAX_GLOBAL_BINDINGS to 128
Karol Herbst [Tue, 10 May 2022 22:01:36 +0000 (00:01 +0200)]
iris: bump IRIS_MAX_GLOBAL_BINDINGS to 128

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18670>

2 years agoiris: speed up walking global bindings
Karol Herbst [Thu, 22 Sep 2022 11:16:18 +0000 (13:16 +0200)]
iris: speed up walking global bindings

we can break on the first NULL resource as frontends always bind
contingous lists of resources without any gaps.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18670>

2 years agoiris: use images_used instead of num_images
Karol Herbst [Thu, 12 May 2022 20:23:30 +0000 (22:23 +0200)]
iris: use images_used instead of num_images

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18670>

2 years agoanv: add grl build dependency on entrypoints
Lionel Landwerlin [Sun, 9 Oct 2022 14:39:44 +0000 (17:39 +0300)]
anv: add grl build dependency on entrypoints

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7446
Fixes: f3ddfd81b4de ("anv: Build BVHs on the GPU with GRL")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19007>

2 years agotu: Lazily init VSC to fix dynamic rendering in secondary cmdbufs
Danylo Piliaiev [Fri, 7 Oct 2022 09:46:55 +0000 (11:46 +0200)]
tu: Lazily init VSC to fix dynamic rendering in secondary cmdbufs

Dynamic renderpasses need vsc_prim_strm_pitch, vsc_draw_strm_pitch
values, and a correct BO. The easiest way to solve this is to
lazily init VSC when it is needed, and not at every cmdbuf
initialization.

Fixes CTS tests (when running with TU_DEBUG=gmem,forcebin):
 dEQP-VK.draw.dynamic_rendering.complete_secondary_cmd_buff.*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18996>

2 years agotu: Do not DCE unused output vars used for transform feedback
Danylo Piliaiev [Mon, 10 Oct 2022 14:18:13 +0000 (16:18 +0200)]
tu: Do not DCE unused output vars used for transform feedback

Fixes CTS tests:
 dEQP-VK.transform_feedback.simple.multiquery_omit_write_1
 dEQP-VK.transform_feedback.simple.multiquery_omit_write_3

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19020>

2 years agogallium/u_threaded: Add optional call-id tracing
Rob Clark [Sat, 1 Oct 2022 16:02:45 +0000 (09:02 -0700)]
gallium/u_threaded: Add optional call-id tracing

If enabled, use a scoped trace to see where calls happen on frontend vs
where they are pushed down to driver.  This is much lighter weight than
printf based tracing, but would still be an extra few instructions even
if perfetto tracing isn't active, so it is not enabled by default.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18927>

2 years agogallium/u_threaded: Add some atrace/perfetto
Rob Clark [Sat, 1 Oct 2022 15:37:45 +0000 (08:37 -0700)]
gallium/u_threaded: Add some atrace/perfetto

Use the MESA_TRACE_BEGIN/END() macros which will generate perfetto
traces (if perfetto is enabled) otherwise atrace (if android build), in
either case creating track events which will show up on the frontend
thread in a perfetto trace, giving visibility into where syncs happen.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18927>

2 years agonv50: call nir_lower_flrp
Thomas Debesse [Sat, 8 Oct 2022 06:43:10 +0000 (08:43 +0200)]
nv50: call nir_lower_flrp

Fix #7432: unknown nir_op flrp assertion

This copy-pastes src/gallium/drivers/radeonsi/si_shader_nir.c

The lower_flrp16 value differs given chipset >= NVISA_GV100_CHIPSET.

Signed-off-by: Thomas Debesse <dev@illwieckz.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19003>

2 years agoclc/clover: Link clang statically when shared-llvm is disabled
pal1000 [Wed, 17 Aug 2022 19:29:21 +0000 (22:29 +0300)]
clc/clover: Link clang statically when shared-llvm is disabled

Makes things easier to handle when aiming for a static build

Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18117>

2 years agogallium: normalized_coords -> unnormalized_coords
Erik Faye-Lund [Wed, 5 Oct 2022 14:20:27 +0000 (16:20 +0200)]
gallium: normalized_coords -> unnormalized_coords

A lot of code zero-initializes pipe_sampler_state, and sets the states
the non-zero fields manually. This means that normalized_coords is the
"default" setting.

However, setting normalized_coords to true isn't allways allowed, and
we'd need to check PIPE_CAP_TEXRECT first. So it's not really the ideal
default here. There's recently been found quite a bit of bugs in this
area, where the state-tracker didn't properly lower texrects.

Let's switch this around to avoid more bugs like this in the future.

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

2 years agor300: don't use smooth line if not requested
Filip Gawin [Wed, 5 Oct 2022 22:59:50 +0000 (00:59 +0200)]
r300: don't use smooth line if not requested

Makes these tests passing:
dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide,UnexpectedPass
dEQP-GLES2.functional.rasterization.interpolation.basic.lines_wide,UnexpectedPass
dEQP-GLES2.functional.rasterization.interpolation.projected.line_loop_wide,UnexpectedPass
dEQP-GLES2.functional.rasterization.interpolation.projected.line_strip_wide,UnexpectedPass
dEQP-GLES2.functional.rasterization.interpolation.projected.lines_wide,UnexpectedPass
dEQP-GLES2.functional.rasterization.primitives.line_loop,UnexpectedPass
dEQP-GLES2.functional.rasterization.primitives.line_strip,UnexpectedPass
dEQP-GLES2.functional.rasterization.primitives.lines,UnexpectedPass
dEQP-GLES2.functional.rasterization.primitives.lines_wide,UnexpectedPass

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

2 years agoutil/radeonsi: enable zerovram workaround for Exanima
Timothy Arceri [Mon, 3 Oct 2022 09:48:06 +0000 (20:48 +1100)]
util/radeonsi: enable zerovram workaround for Exanima

The issue is very intermittent and can sometimes work fine
without the workaround but turning it on seems to resolve
any issues.

Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6449

Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18935>

2 years agoutil/conf: enable init to zero workaround for Exanima
Timothy Arceri [Mon, 3 Oct 2022 09:46:15 +0000 (20:46 +1100)]
util/conf: enable init to zero workaround for Exanima

Fixes rendering issues on llvmpipe.

Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6449

Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18935>

2 years agopps: enable track_event in intel.cfg
Lionel Landwerlin [Sun, 2 Oct 2022 21:36:50 +0000 (00:36 +0300)]
pps: enable track_event in intel.cfg

Take the opportunity to prune some ftraces that are not that useful
and fill the buffer pretty fast.

Record time is bumped to 1.2s

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

2 years agoradv/rra: Transcode nodes recursively
Konstantin Seurer [Wed, 5 Oct 2022 13:34:00 +0000 (15:34 +0200)]
radv/rra: Transcode nodes recursively

Instead of relying on a certain BVH layout, this patch traverses the BVH
from the root node which gets rid of any layout requirements.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18967>

2 years agoci: uprev DXVK to 1.10.3
David Heidelberg [Thu, 29 Sep 2022 14:12:41 +0000 (16:12 +0200)]
ci: uprev DXVK to 1.10.3

Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18888>

2 years agoisaspec: Fix out of date comment
Rob Clark [Sat, 1 Oct 2022 15:21:28 +0000 (08:21 -0700)]
isaspec: Fix out of date comment

Assembler support has existed for a long time.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18926>

2 years agofreedreno: Add perf-debug trace
Rob Clark [Sat, 1 Oct 2022 15:22:45 +0000 (08:22 -0700)]
freedreno: Add perf-debug trace

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18926>

2 years agofreedreno/drm: Don't call kernel with no ops
Rob Clark [Fri, 30 Sep 2022 22:26:38 +0000 (15:26 -0700)]
freedreno/drm: Don't call kernel with no ops

When called with FD_BO_PREP_FLUSH as the only op bit set, the intention
is to only sync with the submit-queue.. we shouldn't be calling down to
the kernel (where op==0 gets interpreted as MSM_PREP_READ).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18926>

2 years agofreedreno: Use TC cpu-storage to shadow buffers
Rob Clark [Tue, 27 Sep 2022 16:52:18 +0000 (09:52 -0700)]
freedreno: Use TC cpu-storage to shadow buffers

We still use the shadow path for non-buffer updates, where TC isn't
playing any tricks.  But for correctness we need to use the cpu-
storage approach, instead of buffer shadowing, otherwise we can race
with the frontend thread for PIPE_MAP_UNSYNCHRONIZED access.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7262
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18926>

2 years agor600: info.stage MESA_SHADER_KERNEL as MESA_SHADER_COMPUTE
Thomas Debesse [Sun, 2 Oct 2022 20:55:30 +0000 (22:55 +0200)]
r600: info.stage MESA_SHADER_KERNEL as MESA_SHADER_COMPUTE

Fixes:

src/gallium/drivers/r600/sfn/sfn_nir.cpp:832: int r600_shader_from_nir(r600_context*, r600_pipe_shader*, r600_shader_key*): Assertion `shader' failed.

karolherbst said:

> long term r600 should implement PIPE_CAP_SHAREABLE_SHADERS

Signed-off-by: Thomas Debesse <dev@illwieckz.net>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18963>

2 years agor600: set clear_buffer = u_default_clear_buffer
Thomas Debesse [Sun, 2 Oct 2022 18:12:42 +0000 (20:12 +0200)]
r600: set clear_buffer = u_default_clear_buffer

Fixes:

thread '<unnamed>' panicked at 'Context missing features. This should never happen!', ../src/gallium/frontends/rusticl/mesa/pipe/context.rs:44:13

Signed-off-by: Thomas Debesse <dev@illwieckz.net>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18962>

2 years agoradv: Remove main_loop_case_visited
Konstantin Seurer [Sun, 2 Oct 2022 11:16:51 +0000 (13:16 +0200)]
radv: Remove main_loop_case_visited

Totals from 7 (14.00% of 50) affected shaders:
CodeSize: 219168 -> 216732 (-1.11%)
Instrs: 40211 -> 40040 (-0.43%)
Latency: 963520 -> 961498 (-0.21%)
InvThroughput: 221435 -> 220974 (-0.21%)
Copies: 5634 -> 5562 (-1.28%)
PreSGPRs: 387 -> 380 (-1.81%)

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

2 years agoradv: Use cache_uuid for accel struct compatibility
Konstantin Seurer [Mon, 3 Oct 2022 12:52:10 +0000 (14:52 +0200)]
radv: Use cache_uuid for accel struct compatibility

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

2 years agogallivm/sample: refactor multisample offset calcs code.
Dave Airlie [Fri, 26 Aug 2022 05:51:32 +0000 (15:51 +1000)]
gallivm/sample: refactor multisample offset calcs code.

Just consoldiate this

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18264>

2 years agogallivm/nir: drop some unused struct members.
Dave Airlie [Fri, 26 Aug 2022 05:38:36 +0000 (15:38 +1000)]
gallivm/nir: drop some unused struct members.

These weren't used in the nir paths.

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18264>

2 years agogallivm/sample: move some first_level/last_level calcs out
Dave Airlie [Fri, 26 Aug 2022 05:13:04 +0000 (15:13 +1000)]
gallivm/sample: move some first_level/last_level calcs out

There were a fair few instances of first/level dynamic state getting,
these could be moved up a level or two and made more common.

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18264>

2 years agoCI: Re-enable Collabora devices
Daniel Stone [Fri, 7 Oct 2022 12:34:42 +0000 (07:34 -0500)]
CI: Re-enable Collabora devices

Friday maintenance is done.

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

2 years agogallium/u_threaded_context: remove stale comment
Erik Faye-Lund [Wed, 5 Oct 2022 16:19:07 +0000 (18:19 +0200)]
gallium/u_threaded_context: remove stale comment

We're now using PIPE_SHADER_MAX_SAMPLER_VIEWS, so this advice is
outdated.

Fixes: 620c5e9dd05 ("gallium/u_threaded_context: Use PIPE_MAX_SHADER_SAMPLER_VIEWS for sampler_buffers")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18973>

2 years agofrontends/va: reallocate surface for yuv400/yuv444 picture
Sathishkumar S [Mon, 26 Sep 2022 13:30:43 +0000 (19:00 +0530)]
frontends/va: reallocate surface for yuv400/yuv444 picture

reallocate the surface appropriately based on the mjpeg sampling factor

v2:
use macros for mjpeg sampling factors (Ruijing Dong)
indentation fix (Thong Thai)

v3:
add comments to mention workaround of reallocation (Boyuan Zhang)

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18914>

2 years agoradeonsi/vcn: enable jpeg decode of yuv444 and yuv400
James Zhu [Mon, 26 Sep 2022 04:36:13 +0000 (10:06 +0530)]
radeonsi/vcn: enable jpeg decode of yuv444 and yuv400

v2: set third plane offset only for 3 plane formats (Boyuan Zhang)

Signed-off-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18914>

2 years agofrontends/va: support yuv 400/444 rt_formats in vaconfig
Sathishkumar S [Mon, 26 Sep 2022 04:30:24 +0000 (10:00 +0530)]
frontends/va: support yuv 400/444 rt_formats in vaconfig

check if vaprofile supports decode of yuv400 and yuv444 formats
and enable the corresponding rt_formats in vaconfig.

v2: use config->entrypoint as param instead of BITSTREAM (Sil Vilerino)

Signed-off-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18914>

2 years agofrontends/va: add support for yuv400 and yuv444
James Zhu [Mon, 26 Sep 2022 04:21:29 +0000 (09:51 +0530)]
frontends/va: add support for yuv400 and yuv444

v2: indentation fixes (Saleem)

Signed-off-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18914>

2 years agoutil/format: add util format y8_400_unorm
James Zhu [Thu, 15 Sep 2022 12:24:52 +0000 (17:54 +0530)]
util/format: add util format y8_400_unorm

Signed-off-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18914>

2 years agopvr: Add vulkan shader factory headers for Query and clear APIs.
Rajnesh Kanwal [Thu, 29 Sep 2022 15:31:32 +0000 (16:31 +0100)]
pvr: Add vulkan shader factory headers for Query and clear APIs.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18976>

2 years agopvr: Split pds compute shader create and upload code for reuse.
Rajnesh Kanwal [Wed, 28 Sep 2022 18:11:21 +0000 (19:11 +0100)]
pvr: Split pds compute shader create and upload code for reuse.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18976>

2 years agopvr: Remove double error reporting.
Rajnesh Kanwal [Wed, 28 Sep 2022 18:05:16 +0000 (19:05 +0100)]
pvr: Remove double error reporting.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18976>

2 years agopvr: Fix allocation size passed in pvr_cmd_buffer_alloc_mem.
Rajnesh Kanwal [Wed, 28 Sep 2022 17:52:27 +0000 (18:52 +0100)]
pvr: Fix allocation size passed in pvr_cmd_buffer_alloc_mem.

pvr_cmd_buffer_alloc_mem takes size in bytes. This change
fixes the invocations which assume it to be size in dwords.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18976>