Commit Graph

149256 Commits

Author SHA1 Message Date
Lionel Landwerlin d3724de894 intel/dev,perf: Use a single timescale function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13996>
2022-01-14 20:17:44 +00:00
Lionel Landwerlin 02a4d622ed anv: expose a couple of emit helper to build utrace buffer copies
We'll want to copy timestamp buffers when commands buffers are
resubmitted multiple times.

v2: Merge a couple of #if GFX_VER >= 8 (Rohan)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13996>
2022-01-14 20:17:44 +00:00
Lionel Landwerlin 246e2c74d3 isl: add helpers to printout ops
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13996>
2022-01-14 20:17:44 +00:00
Lionel Landwerlin e8ea6a899f blorp: add description & helpers to printout ops
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13996>
2022-01-14 20:17:44 +00:00
Lionel Landwerlin 30a8b8d2df intel/fs: disable VRS when omask is written
As indicated by
VkPhysicalDeviceFragmentShadingRatePropertiesKHR::fragmentShadingRateWithShaderSampleMask
our implementation will clamp to 1x1 when reading samplemask or
writing to samplemask.

This fixes vkd3d-proton tests test_sample_mask_dxbc & test_sample_mask_dxil

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b6332fc4a8 ("intel/compiler: handle coarse pixel in render target writes descriptors")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14553>
2022-01-14 19:14:06 +00:00
Chia-I Wu 37fa59fa6c anv,lavapipe,v3dv: use wsi_common_get_image
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (anv)
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> (v3dv)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> (lavapipe)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14544>
2022-01-14 17:41:42 +00:00
Chia-I Wu e6d7e1ec63 vulkan/wsi: add wsi_common_get_image
This can be useful with VkBindImageMemorySwapchainInfoKHR.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14544>
2022-01-14 17:41:42 +00:00
Jesse Natalie dbad53ec6b docs: Update d3d12 feature list
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14504>
2022-01-14 08:36:38 -08:00
Jesse Natalie 14b1319f29 d3d12: Support ARB_framebuffer_no_attachments
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14504>
2022-01-14 08:36:13 -08:00
Jesse Natalie 0cc79c9c1e d3d12: When no framebuffer attachments are present, the viewport must be clamped to framebuffer size
GL has separate no-attachment framebuffer size parameters, but
D3D uses the viewport. Clamp the viewport dimensions to lie within
GL's default framebuffer sizes.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14504>
2022-01-14 08:34:23 -08:00
Jesse Natalie 3f22038973 d3d12: When no framebuffer attachments are present, use ForcedSampleCount instead of SampleDesc.Count for MSAA
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14504>
2022-01-14 08:34:23 -08:00
Mike Blumenkrantz a21d2bfd77 zink: update gfx_pipeline_state.vertex_strides when necessary
only necessary without any of the dynamic states and still doesn't fix
the problem, but it's a step

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14561>
2022-01-14 16:13:57 +00:00
Jesse Natalie dd1c6bff29 docs: Update d3d12 features
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 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