platform/upstream/mesa.git
14 months agoasahi: Refactor PBE upload routine
Alyssa Rosenzweig [Fri, 19 May 2023 18:09:17 +0000 (14:09 -0400)]
asahi: Refactor PBE upload routine

In general, PBE descriptors map pipe_image_views for the hardware. That we use a
writeable shader image internally for render targets is an implementation-detail
of the end-of-tile program. So, refactor the PBE upload routine to take a
pipe_image_view (not a pipe_surface), and translate the pipe_surface into an
internal pipe_image_view for end-of-tile programs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>

14 months agoasahi: Remove unused #define
Alyssa Rosenzweig [Wed, 5 Jul 2023 02:26:36 +0000 (22:26 -0400)]
asahi: Remove unused #define

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>

14 months agoasahi: Use nir_builder_at more
Alyssa Rosenzweig [Wed, 5 Jul 2023 02:24:28 +0000 (22:24 -0400)]
asahi: Use nir_builder_at more

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>

14 months agoasahi: Augment fake drm_asahi_params_global
Alyssa Rosenzweig [Thu, 20 Jul 2023 14:45:18 +0000 (10:45 -0400)]
asahi: Augment fake drm_asahi_params_global

Stub out a bit more UAPI so we can build with the additions in this patch
series.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>

14 months agoIntegrate ci-kdl in the building process and launch process.
Sergi Blanch Torne [Mon, 17 Jul 2023 06:54:58 +0000 (08:54 +0200)]
Integrate ci-kdl in the building process and launch process.

Modify the build process for the images to include the build to have ci-kdl
available in the Mesa jobs. Modify also the init-stage2 to launch in the
background the process that will collect data and store a json file with the
relative changes on the recorded data.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24177>

14 months agoIntroduce ci-kdl builder and launcher.
Sergi Blanch Torne [Mon, 17 Jul 2023 06:51:00 +0000 (08:51 +0200)]
Introduce ci-kdl builder and launcher.

A tool to collect relative changes in some registers of sysfs can be used in
the Mesa jobs to record information while the tests are being executed.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24177>

14 months agoci: add Vignesh Raman into restricted traces access list
Vignesh Raman [Thu, 20 Jul 2023 03:47:53 +0000 (09:17 +0530)]
ci: add Vignesh Raman into restricted traces access list

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24247>

14 months agoci: delete install.tar after extracting it to avoid re-uploading it
Eric Engestrom [Mon, 17 Jul 2023 11:22:17 +0000 (12:22 +0100)]
ci: delete install.tar after extracting it to avoid re-uploading it

Leaving it means it gets re-uploaded when sync'ing the artifacts back
from the DUT to GitLab.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24196>

14 months agor300: fix cycles calculation
Pavel Ondračka [Thu, 20 Jul 2023 08:40:09 +0000 (10:40 +0200)]
r300: fix cycles calculation

There might be more texture semaphores per begin tex block, just do the
cycles calculation on the first one.

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

14 months agoci/a530: switch a few tests to flakes to unblock CI
Lionel Landwerlin [Thu, 20 Jul 2023 05:42:10 +0000 (08:42 +0300)]
ci/a530: switch a few tests to flakes to unblock CI

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

14 months agointel/compiler: use shader source hash in shader dump code
Felix DeGrood [Tue, 18 Jul 2023 18:48:48 +0000 (18:48 +0000)]
intel/compiler: use shader source hash in shader dump code

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

14 months agointel: use shader source hash in INTEL_MEASURE
Felix DeGrood [Wed, 28 Jun 2023 21:15:45 +0000 (21:15 +0000)]
intel: use shader source hash in INTEL_MEASURE

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

14 months agomesa: propagate shader source sha1 from gl_shader to nir_shader
Felix DeGrood [Tue, 18 Jul 2023 18:02:36 +0000 (18:02 +0000)]
mesa: propagate shader source sha1 from gl_shader to nir_shader

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

14 months agoiris: save shader source sha1 in ish
Felix DeGrood [Wed, 28 Jun 2023 23:40:46 +0000 (23:40 +0000)]
iris: save shader source sha1 in ish

Save lowest dword of shader source sha1 in pipeline object for use
later as hash for uniquely identifying shader in debug outputs.

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

14 months agoanv: Add Source hash field to VkPipelineExecutableStatisticKHR
Felix DeGrood [Thu, 29 Jun 2023 04:03:03 +0000 (04:03 +0000)]
anv: Add Source hash field to VkPipelineExecutableStatisticKHR

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

14 months agoanv: save a shader source uint32_t hash in gfx/compute pipelines
Felix DeGrood [Wed, 28 Jun 2023 20:58:33 +0000 (20:58 +0000)]
anv: save a shader source uint32_t hash in gfx/compute pipelines

Save lowest dword of shader source sha1 in pipeline object for use
later as hash for uniquely identifying shader in debug outputs.

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

14 months agointel/compiler: rework input parameters
Lionel Landwerlin [Thu, 13 Jul 2023 23:10:20 +0000 (02:10 +0300)]
intel/compiler: rework input parameters

Use a struct for various common parameters rather than per stage
structure or arguments to stage specific entrypoints.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23942>

14 months agoradv/meta_buffer: Rename size_minus16 to max_offset
Konstantin Seurer [Tue, 18 Jul 2023 13:12:15 +0000 (15:12 +0200)]
radv/meta_buffer: Rename size_minus16 to max_offset

It's just better.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24213>

14 months agoradv/meta_buffer: Stop setting RADV_META_SAVE_DESCRIPTORS
Konstantin Seurer [Tue, 18 Jul 2023 12:53:24 +0000 (14:53 +0200)]
radv/meta_buffer: Stop setting RADV_META_SAVE_DESCRIPTORS

Everything is done via push constants.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24213>

14 months agoradv: Stop using the misleading round_up_u* functions
Konstantin Seurer [Tue, 18 Jul 2023 12:39:27 +0000 (14:39 +0200)]
radv: Stop using the misleading round_up_u* functions

The functions had the same behavior as DIV_ROUND_UP but their names do
not mention a division.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24210>

14 months agor300: cycles estimate for shader-db
Pavel Ondračka [Fri, 14 Jul 2023 08:05:35 +0000 (10:05 +0200)]
r300: cycles estimate for shader-db

To account for:
- macro MAD in vs
- NOPs needed before presubtract
- texture scheduling and a proper texture semaphore usage

The docs don't mention any other references to extra cycles, so otherwise
we assume 1 instruction = 1 cycle.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7573
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24152>

14 months agor300: add a helper for checking number of temporary sources
Pavel Ondračka [Fri, 14 Jul 2023 08:05:27 +0000 (10:05 +0200)]
r300: add a helper for checking number of temporary sources

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24152>

14 months agor300: normal instruction can't have presubtract op
Pavel Ondračka [Fri, 14 Jul 2023 06:22:23 +0000 (08:22 +0200)]
r300: normal instruction can't have presubtract op

Only fs have presubtract ops and by the time we gather the stats,
all normal instructions were converted to pair ones.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24152>

14 months agor300: bump the RC_MAX_INDEX_BITS
Pavel Ondračka [Fri, 14 Jul 2023 10:22:15 +0000 (12:22 +0200)]
r300: bump the RC_MAX_INDEX_BITS

We skip ntt regalloc for vertex shaders and we have 1024 instruction
limit for R500 vs, so in theory we could run some shaders with more that
1024 ssa registers (if we can optimize the number of instruction in the
backend). So add one more bit.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24154>

14 months agor300: source register index is always unsigned
Pavel Ondračka [Fri, 14 Jul 2023 10:21:06 +0000 (12:21 +0200)]
r300: source register index is always unsigned

This was forgotten when we converted to the NIR lowering of negative
indirect adressing.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24154>

14 months agor300: check for index overflow when translating from TGSI
Pavel Ondračka [Fri, 14 Jul 2023 10:16:28 +0000 (12:16 +0200)]
r300: check for index overflow when translating from TGSI

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24154>

14 months agoci/panfrost: introduce OpenGL testing with Mali-G57 MP5 on Asurada chromebook
David Heidelberg [Sat, 8 Jul 2023 12:06:02 +0000 (14:06 +0200)]
ci/panfrost: introduce OpenGL testing with Mali-G57 MP5 on Asurada chromebook

Copy-paste *-skips,fails,flakes from g52.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24198>

14 months agopanfrost: Fix transform feedback on v9 harder
Alyssa Rosenzweig [Wed, 19 Jul 2023 12:42:35 +0000 (08:42 -0400)]
panfrost: Fix transform feedback on v9 harder

We might need more push uniforms (FAU) than the currently bound program. Update
that too for correct results on v9.

Fixes: c282f80c988 ("panfrost: Fix transform feedback on v9")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24198>

14 months agopanfrost: Lower vertex_id for XFB
Alyssa Rosenzweig [Wed, 19 Jul 2023 12:02:22 +0000 (08:02 -0400)]
panfrost: Lower vertex_id for XFB

Even on Valhall, vertex_id is zero-based in a transform feedback program. Lower
that for transform feedback programs properly since it wouldn't happen
automatically on Valhall. Fixes assertion fails.

Fixes: 91ffd103510 ("pan/bi: Lower gl_VertexID in NIR")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24198>

14 months agoamd/ci: update radv-stoney-aco-fails.txt for depth/stencil clear
Chia-I Wu [Wed, 19 Jul 2023 20:46:39 +0000 (13:46 -0700)]
amd/ci: update radv-stoney-aco-fails.txt for depth/stencil clear

This MR fixes the
stencil_d32_sfloat_s8_uint_load_op_none_store_op_none_write_off one.
The rest appears to be outdated.

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

14 months agoradv: fix separate depth/stencil layouts in clear meta
Chia-I Wu [Tue, 27 Jun 2023 18:00:41 +0000 (11:00 -0700)]
radv: fix separate depth/stencil layouts in clear meta

Depth and stencil can be in different layouts.

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

14 months agoradv: refactor depth clear in clear meta
Chia-I Wu [Tue, 27 Jun 2023 19:22:16 +0000 (12:22 -0700)]
radv: refactor depth clear in clear meta

Modify what we pass to radv_fast_clear_depth and emit_depthstencil_clear
in preparation for separate depth/stencil layouts.

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

14 months agoradv: fix separate depth/stencil layouts in resolve meta
Chia-I Wu [Tue, 27 Jun 2023 18:00:41 +0000 (11:00 -0700)]
radv: fix separate depth/stencil layouts in resolve meta

Depth and stencil can be in different layouts.

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

14 months agoradv: fix separate depth/stencil layouts in fb state
Chia-I Wu [Tue, 27 Jun 2023 20:48:12 +0000 (13:48 -0700)]
radv: fix separate depth/stencil layouts in fb state

Set S_028000_DEPTH_COMPRESS_DISABLE/S_028000_STENCIL_COMPRESS_DISABLE
depending on the depth/stencil layouts respectively.

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

14 months agoci: remove binding model from the asan skips for lavapipe.
Dave Airlie [Thu, 12 Jan 2023 02:49:47 +0000 (12:49 +1000)]
ci: remove binding model from the asan skips for lavapipe.

These should be fine now.

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

14 months agodocs/tgsi: Specify that depth texture fetches are replicated
Asahi Lina [Fri, 7 Apr 2023 14:14:24 +0000 (23:14 +0900)]
docs/tgsi: Specify that depth texture fetches are replicated

This is what drivers do, and code like u_blitter expects this.

Commit 6cac9c748eb8 implied that this was already specified, but only
stencil actually was, depth was still listed as TBD. Let's actually
specify this for future reference.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22361>

14 months agoanv: Add support for userptr in Xe KMD
José Roberto de Souza [Tue, 18 Jul 2023 16:05:21 +0000 (09:05 -0700)]
anv: Add support for userptr in Xe KMD

Xe KMD only requires userptr to be bound to VM, so here reusing
workaround_bo->gem_handle id to all userptr bos in Xe version of
gem_create_userptr(). The Xe version of gem_close() will make sure
that workaround_bo->gem_handle is not closed when userptr bos
are closed.

With the same gem_handle for all userptr bos, it was also necessary
skip the anv_device_lookup_bo() and manually allocate memory to store
anv_bo in host heap memory, what lead to some small changes in
anv_device_release_bo() as well.

The remaining changes are the support to VM bind userptr bos and the
gem_vm_bind() call in anv_device_import_bo_from_host_ptr().

Fixes: dEQP-VK.memory.external_memory_host*
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23787>

14 months agoanv: Replace handle by anv_bo in the gem_close()
José Roberto de Souza [Tue, 18 Jul 2023 16:03:13 +0000 (09:03 -0700)]
anv: Replace handle by anv_bo in the gem_close()

struct anv_bo will be needed in the next patch to properly handle
closure of userptr bos.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23787>

14 months agoanv: Add gem_create_userptr() to KMD backend
José Roberto de Souza [Wed, 21 Jun 2023 23:30:39 +0000 (16:30 -0700)]
anv: Add gem_create_userptr() to KMD backend

Xe support of userptr will be implemented in the next patch,
this is just moving the i915 and stub functions to KMD backend.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23787>

14 months agointel/fs: fix missing predicate on SEL instruction
Lionel Landwerlin [Wed, 19 Jul 2023 13:55:21 +0000 (16:55 +0300)]
intel/fs: fix missing predicate on SEL instruction

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d8dfd153c5 ("intel/fs: Make per-sample and coarse dispatch tri-state")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9381
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24236>

14 months agozink: set feedback attachments on batch init
Mike Blumenkrantz [Mon, 26 Jun 2023 12:43:33 +0000 (08:43 -0400)]
zink: set feedback attachments on batch init

just to be safe

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

14 months agozink: set pipeline dynamic state count after all dynamic states are set
Mike Blumenkrantz [Wed, 21 Jun 2023 11:44:28 +0000 (07:44 -0400)]
zink: set pipeline dynamic state count after all dynamic states are set

Fixes: d17c081b7c6 ("zink: use dynamic state for feedback loops when available")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23766>

14 months agonir: Use instructions_pass() for nir_fixup_deref_modes()
Caio Oliveira [Tue, 18 Jul 2023 18:55:01 +0000 (11:55 -0700)]
nir: Use instructions_pass() for nir_fixup_deref_modes()

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24220>

14 months agoir3: Fix FS quad ops returning wrong values from helper invocations
Danylo Piliaiev [Tue, 18 Jul 2023 12:41:03 +0000 (14:41 +0200)]
ir3: Fix FS quad ops returning wrong values from helper invocations

Without SP_FS_CTRL_REG0.LODPIXMASK quad ops don't get values from
helper invocations, but from the current one.

Fixes:
 dEQP-VK.glsl.derivate.dfdxsubgroup.*
 dEQP-VK.glsl.derivate.dfdysubgroup.*

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

14 months agofreedreno/regs: Rename SP_FS_CTRL_REG0.DIFF_FINE into LODPIXMASK
Danylo Piliaiev [Wed, 19 Jul 2023 15:37:53 +0000 (17:37 +0200)]
freedreno/regs: Rename SP_FS_CTRL_REG0.DIFF_FINE into LODPIXMASK

That's the "real" name of the field.

It enables ALL helper invocations in a quad, which is necessary for
fine derivatives and quad subgroup ops.

While PIXLODENABLE by itself enables only 3 out 4 fragments in a quad.

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

14 months agor600/sfn: remove debug output leftovers
Gert Wollny [Wed, 19 Jul 2023 15:27:19 +0000 (17:27 +0200)]
r600/sfn: remove debug output leftovers

Fixes: ae7d904a73b57f6f019346b3926cde5263bff787
    r600/sfn: Implement source mod optimization in backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24239>

14 months agoradeonsi/vcn: Fix setting color range in AV1 bitstream
David Rosca [Mon, 17 Jul 2023 10:57:34 +0000 (12:57 +0200)]
radeonsi/vcn: Fix setting color range in AV1 bitstream

As per spec color_range and chroma_sample_position parameters
are always set, not conditional on color_description_present_flag.

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

14 months agointel/aux_map: Add function and macro to return l2 and l1 table masks
José Roberto de Souza [Mon, 10 Jul 2023 18:24:22 +0000 (11:24 -0700)]
intel/aux_map: Add function and macro to return l2 and l1 table masks

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24077>

14 months agointel/aux_map: Drop magic sub table size number
José Roberto de Souza [Mon, 10 Jul 2023 16:54:05 +0000 (09:54 -0700)]
intel/aux_map: Drop magic sub table size number

Each entry is a uint64_t, L2 and L1 maps 12 bits so:
(1 << 12) = 4096
sizeof(uint64_t) = 8
4096 * 8 = 32768 = 32K

Same value but easier to understand.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24077>

14 months agointel/aux_map: Convert l1_entry_addr_out to canonical
José Roberto de Souza [Mon, 10 Jul 2023 17:42:43 +0000 (10:42 -0700)]
intel/aux_map: Convert l1_entry_addr_out to canonical

The expression 'l1_gpu_addr + l1_index * sizeof(*l1_map)' could cause
bit 47 to be set so it needs to be converted to canonical.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24077>

14 months agointel/aux_map: Mask out bits above index 47 in intel_aux_get_meta_address_mask()
José Roberto de Souza [Mon, 10 Jul 2023 17:36:49 +0000 (10:36 -0700)]
intel/aux_map: Mask out bits above index 47 in intel_aux_get_meta_address_mask()

The bits above index 47 in l1 entry are used to define format,
depth and luminance.
aux_address is formated as canonical, so bits above 47 could all be
set to 1 causing wrong values being set to format, depth and luminance.

intel_aux_get_meta_address_mask() was previously using 2 shifts to
mask out bits above index 47, what is not so obvious and are 2
operations, so here doing a AND with VALID_ADDRESS_MASK to make it
easier to understand.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24077>

14 months agointel/aux_map: Rename some variables to improve readability
José Roberto de Souza [Fri, 7 Jul 2023 17:02:59 +0000 (10:02 -0700)]
intel/aux_map: Rename some variables to improve readability

No changes in behavior here, mostly doing this types of renames:
- address to main_address, to know that addresses refers to main
surface address or aux surface address
- gpu to addr
- main_map_addr to main_inc_addr
- aux_dest_addr to aux_inc_addr

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24077>

14 months agointel/aux_map: Replace magic number by INTEL_AUX_MAP_ENTRY_VALID_BIT
José Roberto de Souza [Fri, 7 Jul 2023 17:04:25 +0000 (10:04 -0700)]
intel/aux_map: Replace magic number by INTEL_AUX_MAP_ENTRY_VALID_BIT

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24077>

14 months agointel/aux_map: Use get_aux_entry() in remove_mapping()
José Roberto de Souza [Mon, 10 Jul 2023 19:04:57 +0000 (12:04 -0700)]
intel/aux_map: Use get_aux_entry() in remove_mapping()

remove_mapping() duplicated almost half of get_aux_entry(), it is
only dropping the cases were entries are not alocated but during
removal it is expected that entries were already alocated so we can
reuse get_aux_entry() and drop duplicated code.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24077>

14 months agointel/aux_map: Nuke format_enum
José Roberto de Souza [Mon, 10 Jul 2023 20:29:16 +0000 (13:29 -0700)]
intel/aux_map: Nuke format_enum

The only user of format_enum is intel_aux_map_get_alignment() that
can easily use information in format->main_page_size.
This allow us to nuke format_enum and remove duplicated information
in intel_aux_map_get_alignment().

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24077>

14 months agoetnaviv: initialize VIVS_GL_BUG_FIXES
Lucas Stach [Fri, 14 Jul 2023 21:32:06 +0000 (23:32 +0200)]
etnaviv: initialize VIVS_GL_BUG_FIXES

Same as the blob, always initialize this state when feature
BUG_FIXES18 is present.

Fixes spec@!opengl 2.0@occlusion-query-discard on GC3000.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24166>

14 months agozink/ci: update list of expected failures for NAVI10
Samuel Pitoiset [Wed, 19 Jul 2023 08:37:30 +0000 (10:37 +0200)]
zink/ci: update list of expected failures for NAVI10

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

14 months agoegl/wayland: wait for compositor to release shm buffers
Robert Mader [Tue, 11 Jul 2023 14:24:41 +0000 (16:24 +0200)]
egl/wayland: wait for compositor to release shm buffers

Some Wayland compositors, notably Exo, do not always release buffers
fast enough, and not in sync with their frame callbacks, to guarantee
that a free buffer is available the next time a client calls
`eglSwapBuffers()`.

This currently leads to a crash in `dri2_wl_swrast_get_backbuffer_data()`
with the swrast backend. To avoid this, simply block until the
compositor releases a buffer eventually.

While arguably compositors should release buffers they don't need any
more for the next frame, this can be quite complex depending on
the architecture - notably multi-process/IPC in case of Exo.

cc: mesa-stable

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24091>

14 months agoanv: Use workaround framework to Wa_14016118574
José Roberto de Souza [Tue, 18 Jul 2023 17:29:39 +0000 (10:29 -0700)]
anv: Use workaround framework to Wa_14016118574

Wa_14016118574 is not the lineage number for this workaround so
it was updated to Wa_22014412737.
Wa_22014412737 is not applicable for MTL B0 steppings and newer
so using the workaround framework eliminates this pipe_control
instruction for not affected revisions.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24221>

14 months agotgsi: remove unused tgsi_shader_info.max_depth
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:50 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.max_depth

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.const_buffers_indirect
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:32 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.const_buffers_indirect

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.indirect_files_written
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:32 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.indirect_files_written

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.indirect_files_read
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:32 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.indirect_files_read

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_bindless_image_atomic
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:32 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_bindless_image_atomic

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_bindless_image_store
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:31 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_bindless_image_store

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_bindless_image_load
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:31 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_bindless_image_load

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_bindless_buffer_atomic
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:31 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_bindless_buffer_atomic

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_bindless_buffer_store
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:31 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_bindless_buffer_store

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_bindless_buffer_load
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:31 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_bindless_buffer_load

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.images_atomic
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:30 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.images_atomic

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.images_store
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:30 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.images_store

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.images_load
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:30 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.images_load

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.culldist_writemask
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:30 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.culldist_writemask

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.clipdist_writemask
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:29 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.clipdist_writemask

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_bindless_images
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:29 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_bindless_images

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_bindless_samplers
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:29 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_bindless_samplers

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_derivatives
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:29 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_derivatives

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_doubles
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:28 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_doubles

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.writes_primid
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:28 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.writes_primid

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_subgroup_info
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:28 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_subgroup_info

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info fields
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:28 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info fields

uses_thread_id
uses_block_id
uses_block_size

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.uses_drawid
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:27 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.uses_drawid

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info fields
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:27 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info fields

Removes:
uses_persp_opcode_interp_centroid
uses_persp_opcode_interp_offset
uses_persp_opcode_interp_sample
uses_linear_opcode_interp_centroid
uses_linear_opcode_interp_offset
uses_linear_opcode_interp_sample

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info fields
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:27 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info fields

Removes:
uses_persp_center
uses_persp_centroid
uses_persp_sample
uses_linear_center
uses_linear_centroid
uses_linear_sample

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.reads_tess_factors
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:26 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.reads_tess_factors

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agosvga: remove unused struct field
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:26 +0000 (18:22 +0200)]
svga: remove unused struct field

This will allow further cleanup in tgsi_shader_info

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.reads_samplemask
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:26 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.reads_samplemask

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.reads_position
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:25 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.reads_position

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.colors_written
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:25 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.colors_written

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.colors_read
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:25 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.colors_read

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.num_memory_instructions
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:24 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.num_memory_instructions

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.array_max
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:22 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.array_max

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agotgsi: remove unused tgsi_shader_info.num_tokens
Thomas H.P. Andersen [Tue, 11 Jul 2023 16:22:09 +0000 (18:22 +0200)]
tgsi: remove unused tgsi_shader_info.num_tokens

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

14 months agopvr: Fix writing query availability write out
Karmjit Mahil [Mon, 17 Jul 2023 12:02:28 +0000 (13:02 +0100)]
pvr: Fix writing query availability write out

The query value was accidentally being written as the availability
value. Queries that were available but of value `0` would never
become available.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24209>

14 months agopvr: Fix occlusion query unaccounted for user fences
Karmjit Mahil [Mon, 17 Jul 2023 09:47:11 +0000 (10:47 +0100)]
pvr: Fix occlusion query unaccounted for user fences

User provided fences can never have a source stage for occlusion
queries as the occlusion query job is internal to the driver. So
at vkQueueSubmit the user's VkFence could be signalled before the
queries had completed.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24209>

14 months agopvr: Allow query stage for barrier sub cmds
Karmjit Mahil [Fri, 14 Jul 2023 12:37:25 +0000 (13:37 +0100)]
pvr: Allow query stage for barrier sub cmds

The function is accounting for the occlusion query job so changing
the assert to allow it.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24209>

14 months agopvr: Use the correct size for the unified store allocation
Karmjit Mahil [Fri, 14 Jul 2023 12:36:46 +0000 (13:36 +0100)]
pvr: Use the correct size for the unified store allocation

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24209>

14 months agopvr: cleanup SPM EOT dynarray after upload
Frank Binns [Mon, 17 Jul 2023 08:05:53 +0000 (09:05 +0100)]
pvr: cleanup SPM EOT dynarray after upload

Fixes a memory leak found with Valgrind.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Fixes: ad0ca7a8794 ("pvr: Compile SPM EOT shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24208>

14 months agonv50/ir: Remove SpillSlot
M Henning [Sat, 13 May 2023 02:54:40 +0000 (22:54 -0400)]
nv50/ir: Remove SpillSlot

Since nothing ever reads this data.

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

14 months agonv50/ir: Remove dead loop from assignSlot
M Henning [Sat, 13 May 2023 02:43:22 +0000 (22:43 -0400)]
nv50/ir: Remove dead loop from assignSlot

This loop can never execute. On entry we have offset = offsetBase and
offsetBase >= stackSize, so the condition offset < stackSize is always
false. The git history suggests that this was always broken this way.

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