Commit Graph

148843 Commits

Author SHA1 Message Date
Jesse Natalie c6e7cdcf38 d3d12: Enable draw and multi-draw indirect
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie 3a8c8d25fd d3d12: Add a compute transformation to handle indirect draws that need draw params
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie a4894fcbfc d3d12: Handle indirect twoface draws
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie 3dd292703b d3d12: Handle draw indirect and multi-draw indirect
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie c9dc4fa7c1 d3d12: Add a command signature cache for indirect draws
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie 529b078718 d3d12: Enable base instance and draw params extensions
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie aaceb10b0f d3d12: Upgrade first vertex state var into all vertex draw params
Add in base instance, draw ID, and is-indexed-draw

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie a98508d092 d3d12: Declare support for inverted conditional render
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie dbc5c3929e d3d12: Predication fix: For boolean queries used for predication, D3D12 uses uint64, so clear at least a uint64 in the result
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie 934dc7b6a0 d3d12: Predication fix: re-enable after restarting a batch if needed
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie 9609387a4f d3d12: Fix re-enabling predication after temporary disablement
The equal-zero vs not-equal-zero property was previously lost

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jesse Natalie 07bf8b18b5 d3d12: Export d3d12_get_state_var from d3d12_nir_passes.c
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>
2022-01-14 15:54:33 +00:00
Jason Ekstrand 8b3d947267 spirv,radv: Fix some GL enum comments
GL_LINE_STRIP_ADJACENCY is 0xB.  0xA is GL_LINES_ADJACENCY.  While we're
here, drop the ARB prefixes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14157>
2022-01-14 15:08:09 +00:00
Jason Ekstrand a1de102479 intel/fs: Use compare_func for wm_prog_key::alpha_test_func
Because 0 is no longer a recognizable value (it's NEVER, which isn't a
good default), we add an emit_alpha_test bool to tell the back-end when
to bother alpha testing.  This lets us only touch crocus with the
change.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14157>
2022-01-14 15:08:09 +00:00
Jason Ekstrand 460a953df5 intel/compiler: Stop using GLuint in brw_compiler.h
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14157>
2022-01-14 15:08:09 +00:00
Mike Blumenkrantz 5f1ca03c45 aux/trace: add pipe_context::fence_server_signal tracing
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14539>
2022-01-14 14:21:36 +00:00
Danylo Piliaiev 3e7f6c9aeb tu: implement wsi hook to decide if we can present directly on device
This will prevent the driver to take the prime blit path for presentation
in scenarios where it can avoid it.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11091>
2022-01-14 12:19:57 +00:00
Danylo Piliaiev fa75b2a027 vulkan/wsi: create a common function to compare drm devices
Effectively moves most of v3dv_wsi_can_present_on_device to the
common code to be used in other drivers.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11091>
2022-01-14 12:19:57 +00:00
Lionel Landwerlin e86ce98c6a intel/devinfo: deal with i915 topology query change
i915 does not report slices accurately anymore on Gfx12.5+. Since this
is information we need to have for performance queries, we need to
rebuild it here.

v2: Remove invalid change to pixel pipes computations (Jordan)

v3: Fix index calculation (Curro)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14297>
2022-01-14 12:01:05 +00:00
Lionel Landwerlin 6d73426d2a intel/devinfo: split out l3/pixelpipes counting
v2: fix up subslice_total store (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (v1)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14297>
2022-01-14 12:01:05 +00:00
Jordan Justen 7609e88d5f intel/devinfo: Adjust L3 banks for DG2
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Co-Authored-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14297>
2022-01-14 12:01:05 +00:00
Lionel Landwerlin 5f3b0327b7 intel/dev: extract slice/subslice total computation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14297>
2022-01-14 12:01:05 +00:00
Iago Toral Quiroga b0f7f1afac v3d: implement double-buffer mode
As with Vulkan, we are not enabling this by default since it may
improve of hurt performance depending on the case. Instead, we
can selectively enable it by using the V3D_DEBUG environment
variable.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14551>
2022-01-14 10:57:27 +00:00
Iago Toral Quiroga b9f9474577 v3dv: implement double-buffer mode
Double buffer mode splits the tile buffer size in half so we can
start processing the next tile while the current one is being
stored to memory. This mode is available only if MSAA is not enabled
and can, in theory, improve performance by reducing tile store
overhead, however, it comes at the cost of reducing the tile size,
which also causes some overhead of its own.

Testing shows that this helps some cases (i.e the Vulkan Quake
ports) but hurts others (i.e. Unreal Engine 4), so for the time
being we don't enable this by default but we allow to enable it
selectively by using V3D_DEBUG.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14551>
2022-01-14 10:57:26 +00:00
Alejandro Piñeiro 821c66e50c vulkan: return default string for undefined enum
Instead of a unreachable.

This would avoid an assert on debug builds that uses vkfoo_to_str to
print structure types. This will become more common as some tests will
start to use VK_STRUCTURE_TYPE_MAX_ENUM to mark structures from
unsupported extensions more often.

v2 (Jason):
   * Include enum name on the default message
   * Handle MAX_ENUM as a special case

v3 (Jason):
   * vk_ObjectType_to_ObjectName don't need to use ${enum.name}

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14525>
2022-01-14 10:31:15 +00:00
Iago Toral Quiroga fbe4d7ccf4 v3dv: implement VK_EXT_4444_formats
Because these formats are introduced trough an extension, their
enum values are exceedingly large and we cannot use them to index
directly into the format table we had for core formats. Instead,
we put these in a separate table and we always use the
VK_ENUM_OFFSET helper to index into these tables.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14533>
2022-01-14 10:10:10 +00:00
Iago Toral Quiroga 25c46c465d v3dv: handle formats with reverse flag
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14533>
2022-01-14 10:10:10 +00:00
Iago Toral Quiroga 872f08815b v3dv: add swizzle helpers to identify formats wit R/B swap and reverse flags
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14533>
2022-01-14 10:10:10 +00:00
Charles Giessen dbd3935b04 freedreno, tu: Export vk_icdGetPhysicalDeviceProcAddr
Support Loader ICD Interface Version 4 by exporting the function
vk_icdGetPHysicalDeviceProcAddr.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14299>
2022-01-14 10:26:13 +01:00
Charles Giessen b00fe27015 panvk: Export vk_icdGetPhysicalDeviceProcAddr
Support Loader ICD Interface Version 4 by exporting the function
vk_icdGetPhysicalDeviceProcAddr.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14299>
2022-01-14 10:26:00 +01:00
Charles Giessen 5a37cc1186 v3dv: Update LoaderICDInterfaceVersion to v4
vk_icdNegotiateLoaderICDInterfaceVersion now correctly identifies the
driver as supporting v4. Before, the driver did support the
functionality but didn't report supporting it through the negotiate
function.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14299>
2022-01-14 10:25:50 +01:00
Charles Giessen 9d013f2c24 radv: Update description of vk_icdNegotiateLoaderICDInterfaceVersion
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14299>
2022-01-14 10:25:41 +01:00
Mike Blumenkrantz 307cdb7147 zink: add some nv ci results
just something so I have a vague idea

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14547>
2022-01-13 21:46:34 +00:00
Mike Blumenkrantz f0eb07f98f zink: remove SpvMemorySemanticsMakeVisibleMask from nir_intrinsic_memory_barrier
this is invalid since vk memory model isn't used

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14540>
2022-01-13 14:57:56 -05:00
Samuel Pitoiset 74b0fbe2e9 radv: enable radv_disable_aniso_single_level for Battlefield 1 & V
Both games seem to have a bug. This can also be reproduced with
AMDVLK since PAL enabled anisotropic filtering for single level images.

Fixes: 5ce4017a2b ("radv,aco: do not disable anisotropy filtering for non-mipmap images")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5753
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14471>
2022-01-13 16:17:48 +00:00
Samuel Pitoiset e6173ed1d2 radv: allow to disable anisotropic filtering for single level image with drirc
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14471>
2022-01-13 16:17:48 +00:00
Carsten Haitzler 874f4095c5 panfrost: Don't double-free when handling error for unsupported GPU
Setting the screen ro member before we checked gpu id means the error
case leads to a double-free because screen->ro is set and allocated
by parent who hanbdles de-alloc a second time after we destroyed the
screen we just created because ro was set.

Cc: mesa-stable

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14516>
2022-01-13 16:01:08 +00:00
Carsten Haitzler 7553aee06b kmsro: Add komeda DPU
Arm Komeda (Mali) display units do exist on a few SoC's. This is the
first time that I've seen Mesa brought up "in anger" on one of these,
thus it has no such knowledge of these DPUs. This adds that to the
kmsro set like a lot of other fairly standard split GPU/DPU devices.

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14515>
2022-01-13 15:25:44 +00:00
Carsten Haitzler b22294f6d5 panfrost: Add GPU G76 to the set of known ids
This is another working GPU so add the ID to the known set. Working on
real silicon and tested.

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14517>
2022-01-13 14:59:48 +00:00
Mike Blumenkrantz 596d2ab0ad util/vbuf: fix buffer translation sizing
the original change here attempted to fix calculating the maximum bound for the
mapped readback buffer by adding the maximum attribute size to the final element
used by readback

the calculation was erroneous, however, because it instead calculated the maximum
offset instead of the size, which would cause a different kind of overrun

Fixes: 3c5b7dca30 ("util/vbuf: fix buffer overrun in attribute conversions")

fixes #5846

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14479>
2022-01-13 14:28:23 +00:00
Connor Abbott 8f18c72f9a freedreno/fdl: Fix reinterpreting "size-compatible" formats
It's allowed to reinterpret compressed formats as one of a few
non-compressed formats with the same pixel size as the blocksize of the
compressed format, and vice-versa. If we did this we'd wind up with an
incorrect width/height. Fix that.

Fixes dEQP-VK.image.sample_texture.*.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14520>
2022-01-13 13:44:14 +00:00
Alejandro Piñeiro d7cbe17760 v3dv: simplify v3dv_debug_ignored_stype
mesa_logd already handles having or not DEBUG defined, and also has a
better empty option.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14512>
2022-01-13 13:18:05 +00:00
Samuel Pitoiset 49c1b40290 radv: only clear VRS_HTILE_ENCODING on GFX10.3+
On older chips like GFX9, bit 19 is RB_ALIGNED.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5859
Fixes: 9c746157ae ("radv: reset VRS if the current subpass doesn't have a VRS attachment")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14530>
2022-01-13 12:57:39 +00:00
Vadym Shovkoplias fd2fbc558b glthread: Check out of bounds for MultiDrawElementsBaseVertex cmd
Make sure draw count is not high so the MultiDrawElementsBaseVertex cmd
can fit the queue buffer.

v2: add the same check for _mesa_marshal_MultiDrawArrays and add additional
    assert to _mesa_glthread_allocate_command (Pierre-Eric)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5719
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14490>
2022-01-13 12:05:11 +00:00
Jordan Justen 70a4e64685 intel: Add *disabled* device ids for DG2
We are waiting for i915 to enable DG2 in upstream Linux, so for now we
use an "#if 0" around the PCI ids.

Reworks:
 * Merged Lionel's "intel/devinfo: store the different kind of DG2"

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14524>
2022-01-13 09:48:51 +00:00
Jordan Justen 4f9141607f intel: Add device info for DG2
Reworks:
 * Lionel: simulator_id
 * Rafael: has_llc
 * Merged Lionel's "intel/devinfo: store the different kind of DG2"

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14524>
2022-01-13 09:48:51 +00:00
Juan A. Suarez Romero cd678c7029 v3d/doc: do not expose ARB_shader_image_load_store
V3D does not support formatless writings.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14288>
2022-01-13 09:12:35 +00:00
Juan A. Suarez Romero bd70b4f27f mesa: fix MAX_GEOMETRY_IMAGE_UNIFORMS check support
MAX_GEOMETRY_IMAGE_UNIFORMS are supported if geometry shaders and either
ARB_shader_image_load_store or GLES 3.1 are supported.

v2:
 - MAX_GEOMETRY_IMAGE_UNIFORMS shouldn't be supported for GL 3.2 if
   ARB_shader_image_load_store is not supported (Ilia).
 - MAX_TESS_{CONTROL,EVALUATION}_IMAGE_UNIFORMS requires tessellation
   shader support (Anholt).

v3:
 - Use _mesa_is_gles31() function (Ilia).

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14288>
2022-01-13 09:12:35 +00:00
Juan A. Suarez Romero 3b81d2d30d mesa/st: do not expose ARB_shader_image_load_store if not fully implemented
So far we were checking ARB_shader_image_load_store is supported as
requirement to expose GLES 3.1.

But when this extension functionality was added in GLES 3.1 spec, it
was relaxed, and one of its requirements, the support for formatless
writing, was not included.

So this means that a driver that support all the extension
functionality except formatless writing, could expose GLES 3.1, but it
couldn't expose the extension itself (nor GL 4.2, which requires fully
implementation of the extension).

v2:
 - Add the same exposure treatment to ARB_shader_image_size (Ilia).

v3:
 - Remove dependency for OES_texture_buffer (Ilia).
 - Check image resources for GLES 3.1 (Ilia).

v4:
 - Check for MaxImageUniforms in compute shader (Ilia).
 - Check for max combined image uniforms/ssbo (Ilia).

v5:
 - Remove ARB_shader_image_load_store from check (Ilia).
 - ARB_shader_image_store and ARB_shader_image required for
   ARB_ES3_1_compatibility (Ilia).

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14288>
2022-01-13 09:12:35 +00:00
Juan A. Suarez Romero d9bc018854 d3d12: enable PIPE_CAP_IMAGE_STORE_FORMATTED
Required to expose ARB_shader_load_image_store and thus
ARB_compute_shader, which are supported by the driver.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14288>
2022-01-13 09:12:35 +00:00