platform/upstream/mesa.git
12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 months agonv50/ir: Remove Function.stackPtr
M Henning [Sat, 13 May 2023 02:08:50 +0000 (22:08 -0400)]
nv50/ir: Remove Function.stackPtr

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

12 months agonv50/ir: Remove ArgumentMovesPass
M Henning [Sat, 13 May 2023 02:01:13 +0000 (22:01 -0400)]
nv50/ir: Remove ArgumentMovesPass

We only use OP_CALL for builtins at this point, so no need for this.

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

12 months agonv50/ir: Drop nir_jump_return handling
M Henning [Sat, 13 May 2023 01:40:18 +0000 (21:40 -0400)]
nv50/ir: Drop nir_jump_return handling

This is always lowered before this point.

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

12 months agorusticl: Wire the 'start' and 'end' profilng times up
Dr. David Alan Gilbert [Mon, 10 Jul 2023 14:10:31 +0000 (15:10 +0100)]
rusticl: Wire the 'start' and 'end' profilng times up

We use the timestamp pipe queries to retrieve times from the
device, hopefully close to the execution of the code.

For now we use the End value for complete as well.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24101>

12 months agorusticl: Wrap pipe query reads
Dr. David Alan Gilbert [Tue, 11 Jul 2023 20:34:04 +0000 (21:34 +0100)]
rusticl: Wrap pipe query reads

Take a query we previously created and read it's result.
The type of the result is usually implicitly known; for now
just handle the query we use in 64 bit.

This is safe because the trait bindings ensure that
when we create a query with PipeQueryGen we embed the type
of the result in the PipeQuery, and that produces the correct
result type.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24101>

12 months agorusticl: Wrap pipe queries
Dr. David Alan Gilbert [Mon, 10 Jul 2023 14:05:53 +0000 (15:05 +0100)]
rusticl: Wrap pipe queries

Pipe queries are asynchronous state reads, you create a query
and sometime later retrieve the result.

Wrap the underlying basic calls and types and provide a type
(PipeQuery) to handle the lifetype of the query.  Note the pipe context
used for the query must live at last as long as the query.

Queries are created by calls to the PipeQueryGen, a wrapper
that figures out the return type and wraps that in the intermediate
that's returned.   A typical use is:

  query_start = PipeQueryGen::<{pipe_query_type::PIPE_QUERY_TIMESTAMP}>::new(ctx);

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24101>

12 months agorusticl: Wire the 'submit' profiling time up
Dr. David Alan Gilbert [Fri, 7 Jul 2023 00:23:47 +0000 (01:23 +0100)]
rusticl: Wire the 'submit' profiling time up

Set it from the timestamp when it's taken out of the queue and
submitted, and wire the APU up to read it.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24101>

12 months agorusticl: Wire the 'queued' profiling time up
Dr. David Alan Gilbert [Thu, 6 Jul 2023 00:56:02 +0000 (01:56 +0100)]
rusticl: Wire the 'queued' profiling time up

Set it from the timestamp when it's added to the queue, and wire
the API up to read it.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24101>

12 months agorusticl/core: Add profiling time storage (queued) to event
Dr. David Alan Gilbert [Thu, 6 Jul 2023 00:52:06 +0000 (01:52 +0100)]
rusticl/core: Add profiling time storage (queued) to event

Add the first, of a few, profiling time values to the Event,
with access methods.  This is defined as

   'when the command identified by event is enqueued in a command-queue
    by the host'

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24101>

12 months agonvc0: initial Ada enablement
Karol Herbst [Tue, 18 Jul 2023 20:22:43 +0000 (22:22 +0200)]
nvc0: initial Ada enablement

Cc: 23.2 <mesa-stable>
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24226>

12 months agoetnaviv: fix segfault after compile failure
Philipp Zabel [Mon, 17 Jul 2023 10:46:59 +0000 (12:46 +0200)]
etnaviv: fix segfault after compile failure

Do not try to determine the shader stage from the compiled shader
variant, which may be NULL after compile failure. Instead, get it
from the NIR shader.

Fixes a segfault when trying to evaluate etna_shader_stage(NULL)
after compile failure.

Suggested-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Fixes: 3d496190715b ("etnaviv: add support for performance warnings")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24178>

12 months agovirgl: Enable vp9 hardware decode
Honglei Huang [Mon, 3 Apr 2023 10:12:26 +0000 (18:12 +0800)]
virgl: Enable vp9 hardware decode

Add vp9 fill function in fill_picture_desc to enable vp9 decoding.

Signed-off-by: Honglei Huang <honglei1.huang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108>

12 months agovirgl: Implement vp9 hardware decode
Boyuan Zhang [Mon, 27 Mar 2023 11:31:57 +0000 (19:31 +0800)]
virgl: Implement vp9 hardware decode

Implement vp9 hardware decode by filling vp9 picture desc.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108>

12 months agovirgl: Add vp9 picture desc
Boyuan Zhang [Fri, 23 Sep 2022 13:52:15 +0000 (09:52 -0400)]
virgl: Add vp9 picture desc

Define vp9 picture and slice parameters.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108>

12 months agovirgl/video: Add jpeg buf start code check
Honglei Huang [Thu, 12 Jan 2023 08:14:01 +0000 (16:14 +0800)]
virgl/video: Add jpeg buf start code check

Add jpeg start code check to fix the issue that
double header adding in virgl video codec.

Signed-off-by: Honglei Huang <honglei1.huang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108>

12 months agovirgl/video: Add more pipe type in virgl formats convert table
Honglei Huang [Wed, 11 Jan 2023 08:48:45 +0000 (16:48 +0800)]
virgl/video: Add more pipe type in virgl formats convert table

Add Y8_400_UNORM, YUYV, Y8_U8_V8_444_UNORM,
R8G8_R8B8_UNORM into virgl_formats_conv_table to fix
the resource create fail issue.

Signed-off-by: Honglei Huang <honglei1.huang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108>

12 months agovirgl/video: Add support for hevc10bit decoding.
Honglei Huang [Thu, 15 Dec 2022 08:02:09 +0000 (16:02 +0800)]
virgl/video: Add support for hevc10bit decoding.

Add P010 CONV_FORMAT to support virgl hevc10bit decoding.

Signed-off-by: Honglei Huang <honglei1.huang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108>

12 months agovirgl/video: Add support for jpeg decoding
Honglei Huang [Thu, 15 Dec 2022 07:54:47 +0000 (15:54 +0800)]
virgl/video: Add support for jpeg decoding

Implement for virgl jpeg decoding.

Signed-off-by: Honglei Huang <honghuan@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108>

12 months agovirgl/video: Add support for vc1 decoding
Honglei Huang [Wed, 23 Nov 2022 08:56:21 +0000 (16:56 +0800)]
virgl/video: Add support for vc1 decoding

Implement for virgl vc1 decoding.

Signed-off-by: Honglei Huang <honglei1.huang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108>

12 months agovirgl/video: Add support for mpeg12 decoding
Honglei Huang [Thu, 12 Jan 2023 09:46:12 +0000 (17:46 +0800)]
virgl/video: Add support for mpeg12 decoding

Implement for mpeg12 virgl video decoding.

Signed-off-by: Honglei Huang <honglei1.huang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108>

12 months agointel/vec4: Drop support for nir_register
Faith Ekstrand [Wed, 12 Jul 2023 07:37:33 +0000 (02:37 -0500)]
intel/vec4: Drop support for nir_register

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24104>

12 months agointel/fs: Drop support for nir_register
Faith Ekstrand [Wed, 12 Jul 2023 07:37:17 +0000 (02:37 -0500)]
intel/fs: Drop support for nir_register

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24104>

12 months agointel: Switch to intrinsic-based registers
Faith Ekstrand [Thu, 18 May 2023 19:14:18 +0000 (14:14 -0500)]
intel: Switch to intrinsic-based registers

Results on HSW (vec4 only):

    total instructions in shared programs: 2978400 -> 2974135 (-0.14%)
    instructions in affected programs: 77870 -> 73605 (-5.48%)
    helped: 143
    HURT: 48
    helped stats (abs) min: 1 max: 100 x̄: 30.22 x̃: 9
    helped stats (rel) min: 0.03% max: 30.49% x̄: 8.02% x̃: 6.39%
    HURT stats (abs)   min: 1 max: 4 x̄: 1.19 x̃: 1
    HURT stats (rel)   min: 0.08% max: 16.67% x̄: 3.71% x̃: 3.23%
    95% mean confidence interval for instructions value: -26.69 -17.97
    95% mean confidence interval for instructions %-change: -6.24% -3.90%
    Instructions are helped.

    total cycles in shared programs: 45345924 -> 44742666 (-1.33%)
    cycles in affected programs: 29083466 -> 28480208 (-2.07%)
    helped: 4785
    HURT: 3879
    helped stats (abs) min: 2 max: 8072 x̄: 276.00 x̃: 24
    helped stats (rel) min: 0.02% max: 54.43% x̄: 7.78% x̃: 1.95%
    HURT stats (abs)   min: 2 max: 14736 x̄: 184.95 x̃: 20
    HURT stats (rel)   min: 0.02% max: 97.00% x̄: 7.69% x̃: 1.53%
    95% mean confidence interval for cycles value: -83.49 -55.77
    95% mean confidence interval for cycles %-change: -1.16% -0.55%
    Cycles are helped.

    total spills in shared programs: 1093 -> 539 (-50.69%)
    spills in affected programs: 772 -> 218 (-71.76%)
    helped: 74
    HURT: 0

    total fills in shared programs: 760 -> 757 (-0.39%)
    fills in affected programs: 66 -> 63 (-4.55%)
    helped: 3
    HURT: 0

Results on TGL (all stages):

    total instructions in shared programs: 21486982 -> 21488266 (<.01%)
    instructions in affected programs: 2245938 -> 2247222 (0.06%)
    helped: 1288
    HURT: 1385
    helped stats (abs) min: 1 max: 93 x̄: 4.05 x̃: 2
    helped stats (rel) min: 0.02% max: 3.82% x̄: 0.61% x̃: 0.46%
    HURT stats (abs)   min: 1 max: 134 x̄: 4.69 x̃: 2
    HURT stats (rel)   min: <.01% max: 5.59% x̄: 0.65% x̃: 0.44%
    95% mean confidence interval for instructions value: 0.13 0.83
    95% mean confidence interval for instructions %-change: <.01% 0.08%
    Instructions are HURT.

    total cycles in shared programs: 809326677 -> 809475669 (0.02%)
    cycles in affected programs: 447781659 -> 447930651 (0.03%)
    helped: 1924
    HURT: 1994
    helped stats (abs) min: 1 max: 74567 x̄: 1217.49 x̃: 10
    helped stats (rel) min: <.01% max: 38.44% x̄: 1.09% x̃: 0.17%
    HURT stats (abs)   min: 1 max: 76426 x̄: 1249.47 x̃: 8
    HURT stats (rel)   min: <.01% max: 137.11% x̄: 1.64% x̃: 0.17%
    95% mean confidence interval for cycles value: -125.61 201.67
    95% mean confidence interval for cycles %-change: 0.12% 0.48%
    Inconclusive result (value mean confidence interval includes 0).

    LOST:   4
    GAINED: 4

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24104>

12 months agointel/vec4: Add support for new-style registers
Faith Ekstrand [Thu, 18 May 2023 21:24:07 +0000 (16:24 -0500)]
intel/vec4: Add support for new-style registers

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24104>

12 months agointel/vec4: Assume get_nir_dest() provides a sane write-mask
Faith Ekstrand [Thu, 18 May 2023 21:58:01 +0000 (16:58 -0500)]
intel/vec4: Assume get_nir_dest() provides a sane write-mask

It should be providing a write mask that is all the channels.  Drop the
one case for load_input where we stomp this for no good reason.  Also,
make ALU write-masking AND with the existing mask.  This prepares us for
the next patch where we convert to new-style registers.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24104>