Marek Olšák [Sun, 18 Dec 2022 21:44:48 +0000 (16:44 -0500)]
glthread: disallow glthread if buffer uploads are unsupported
to remove fail paths that defeat the purpose of glthread.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Sun, 18 Dec 2022 20:56:50 +0000 (15:56 -0500)]
glthread: do vertex uploads if an index buffer is present for MultiDrawElements
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Sat, 24 Dec 2022 17:36:49 +0000 (12:36 -0500)]
glthread: remove the vbo_upload_ratio_too_large fallback for glMultiDrawElements
This would be possible to implement, but we don't know of any app where
it would help.
Now glthread fully handles all non-VBO uploads except glDrawIndirect.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Wed, 21 Dec 2022 06:55:46 +0000 (01:55 -0500)]
glthread: make marshal functions for glBegin/End attribs non-static
for a future commit
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Wed, 21 Dec 2022 06:48:00 +0000 (01:48 -0500)]
glthread: pack and name the type of glthread_vao::Attrib
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Wed, 21 Dec 2022 06:36:51 +0000 (01:36 -0500)]
mesa: move gl_vertex_format_user definition into glthread.h
glthread.h needs it and it can't include mtypes.h because mtypes.h
includes it.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Sun, 18 Dec 2022 20:56:50 +0000 (15:56 -0500)]
glthread: do vertex uploads if an index buffer is present for glDrawElements
glthread didn't implement uploading non-VBO vertices if indices were
in a buffer. This implements that.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Tue, 13 Dec 2022 04:31:16 +0000 (23:31 -0500)]
glthread: change multi_draw_elements_async() to never fail due to large size
Some callers (not visible here) silently ignore the return value. Remove
the return value and handle the failure in multi_draw_elements_async.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Tue, 13 Dec 2022 03:30:51 +0000 (22:30 -0500)]
glthread: execute glMultiDrawArrays(draw_count < 0) asynchronously
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Tue, 17 Jan 2023 19:37:03 +0000 (14:37 -0500)]
glthread: set GL_OUT_OF_MEMORY if we fail to upload vertices
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Tue, 17 Jan 2023 19:37:03 +0000 (14:37 -0500)]
glthread: set GL_OUT_OF_MEMORY if we fail to upload indices
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Mon, 26 Dec 2022 19:59:53 +0000 (14:59 -0500)]
glthread: handle GL_*_ARRAY in glEnable/Disable
Surprisingly, the GL compatibility profile allows these in both
glEnableClientState and glEnable.
Fixes:
0b1dd185913 - glthread: track which vertex array attribs are enabled
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Sun, 18 Dec 2022 23:40:08 +0000 (18:40 -0500)]
glapi: autogenerate function parameters with no space between * and variable
print "int *v" instead of "int * v".
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Wed, 21 Dec 2022 10:45:51 +0000 (05:45 -0500)]
mesa: allow GL_UNSIGNED_INT64_ARB as vertex format for ARB_bindless_texture
This wasn't implemented, but the spec requires it.
Fixes:
1fe7b1f9724 - mesa: implement ARB_bindless_texture
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Mon, 19 Dec 2022 06:17:13 +0000 (01:17 -0500)]
util: fix util_is_vbo_upload_ratio_too_large
It was wrong. For example, if the draw vertex count was 10 and the upload
vertex count was 150, u_vbuf wouldn't unroll the draw and would instead
memcpy 150 vertices. This fixes that case.
Fixes:
068a3bf0d7c - util: move and adjust the vertex upload heuristic equation from u_vbuf
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
Marek Olšák [Fri, 20 Jan 2023 00:57:02 +0000 (19:57 -0500)]
glthread: fix an upload buffer leak
Fixes:
befbd54864d29 - glthread: don't use atomics for refcounting to decrease overhead on AMD Zen
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20804>
Lionel Landwerlin [Fri, 20 Jan 2023 07:41:04 +0000 (09:41 +0200)]
anv: fix preemption enable emission in gpu_memcpy
This has to be before the MI_BATCH_BUFFER_END otherwise it has no
effect.
This also was messing around with you batch length alignment.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
b9aa66d5d0 ("anv: disable preemption for 3DPRIMITIVE during streamout")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20802>
Mike Blumenkrantz [Thu, 19 Jan 2023 16:31:11 +0000 (11:31 -0500)]
radv: remove redundant type sizing
this is already 8 bits
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20751>
Mike Blumenkrantz [Tue, 17 Jan 2023 15:50:45 +0000 (10:50 -0500)]
radv: add some graphics pipeline hints to optimize pipeline bind
this is a costly function, and we want to avoid loading random struct data
as much as possible
these struct members aren't accessed anywhere else in the function, so eliminating
access avoids some cpu overhead
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20751>
Mike Blumenkrantz [Tue, 17 Jan 2023 15:41:55 +0000 (10:41 -0500)]
radv: simplify depth aspect check in radv_handle_image_transition()
this info is already available, so reduce cpu overhead
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20751>
Mike Blumenkrantz [Tue, 17 Jan 2023 15:40:49 +0000 (10:40 -0500)]
radv: reorder dynamic state checks during bind
this avoids potential out-of-order reads from a struct that spans
18 CPU cachelines
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20751>
Mike Blumenkrantz [Fri, 13 Jan 2023 17:03:55 +0000 (12:03 -0500)]
radv: repack radv_graphics_pipeline struct
this reduces the number of cachelines used by the struct and allows for
improved memory access
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20751>
Jesse Natalie [Wed, 18 Jan 2023 22:15:54 +0000 (14:15 -0800)]
dzn: Support basic subgroups
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20777>
Jesse Natalie [Wed, 18 Jan 2023 22:15:04 +0000 (14:15 -0800)]
spirv2dxil: Support basic subgroups
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20777>
Jesse Natalie [Wed, 18 Jan 2023 22:14:38 +0000 (14:14 -0800)]
spirv2dxil: Use 32-bit shared offsets
nir_build_deref_var assumes that you're going to do so, and
there's no reason to use 64-bit types for Vulkan compute.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20777>
Jesse Natalie [Wed, 18 Jan 2023 22:13:41 +0000 (14:13 -0800)]
microsoft/compiler: Add lowering passes for basic subgroup vars
DXIL doesn't have a "subgroup ID" or "num subgroups" construct,
so add lowering to construct them. Subgroup ID is done using
once-per-subgroup atomics on a workgroup-shared variable, and
then broadcasting that (using read_first_invocation) to the other
threads. Num subgroups is just a division with the workgroup size.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20777>
Jesse Natalie [Wed, 18 Jan 2023 22:12:03 +0000 (14:12 -0800)]
microsoft/compiler: Implement a few basic wave/subgroup intrinsics
These are the ones that map perfectly between SPIR-V and DXIL that
are in the "basic" extension group (except for read-lane-first,
but we'll use with some lowering shortly).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20777>
Jesse Natalie [Wed, 18 Jan 2023 22:10:25 +0000 (14:10 -0800)]
microsoft/compiler: Add an overload param to unary function helpers
Subgroup ops aren't i32, they use none.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20777>
Mike Blumenkrantz [Thu, 19 Jan 2023 20:35:17 +0000 (15:35 -0500)]
zink: don't use ds3 blend states without color attachments
this is illegal and causes validation errors
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20799>
Mike Blumenkrantz [Thu, 19 Jan 2023 20:22:08 +0000 (15:22 -0500)]
zink: delete need_blend_constants
this is an artifact of very old code before the dynamic state was set
for all graphics pipelines
now the checks only cause blend constants to not be updated, which triggers
bugs and validation failures
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20799>
José Roberto de Souza [Thu, 22 Sep 2022 18:31:01 +0000 (11:31 -0700)]
intel/dev: Split hwconfig i915 specific code
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20437>
José Roberto de Souza [Mon, 22 Aug 2022 18:44:53 +0000 (11:44 -0700)]
intel/dev: Move i915 code to i915/intel_device_info.c
No behavior changes here.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20437>
José Roberto de Souza [Mon, 22 Aug 2022 18:14:36 +0000 (11:14 -0700)]
intel/dev: Export functions that will be used by different kernel drivers
No behavior changes here.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20437>
Samuel Pitoiset [Thu, 19 Jan 2023 09:14:53 +0000 (10:14 +0100)]
radv: remove an old FIXME about a possible bug with TC-compat HTILE
I added this FIXME 2 years ago because it was unclear if it was
broken or not. Since, CTS coverage improved and the number of tests
with depth/stencil on the compute queue increased a lot. vkd3d-proton
also widely uses depth/stencil with GENERAL on GFX10+ and likely with
async compute as well. No issues so far.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4048
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20785>
Rob Clark [Mon, 16 Jan 2023 16:35:06 +0000 (08:35 -0800)]
freedreno: Add driconf to disable conservative LRZ
The problematic sequence of draws is pretty rare. But there are a small
handful of games which do not exhibit the problematic sequence and for
which invalidating LRZ on draws with blend plus depthwrite enabled hurts
performance slightly. This driconf option enables opting in to the
previous behavior.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
Rob Clark [Mon, 16 Jan 2023 16:38:03 +0000 (08:38 -0800)]
util/xmlconfig: Use os_get_option()
Enable the property_get() fallback on android.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
Rob Clark [Sat, 14 Jan 2023 19:18:26 +0000 (11:18 -0800)]
turnip: Invalidate LRZ on blend+depthwrite
See the previous commit for details.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
Rob Clark [Tue, 17 Jan 2023 16:41:54 +0000 (08:41 -0800)]
turnip: Rename lrz force_disable_mask
Prep to use it to communicate more than just force-disable cases.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
Rob Clark [Sat, 14 Jan 2023 18:17:53 +0000 (10:17 -0800)]
freedreno/a6xx: Invalidate LRZ on blend+depthwrite
Writing depth with blend enabled means we need to invalidate LRZ,
because the written depth value could mean that a later draw with
depth enabled (where we would otherwise write LRZ) could have
fragments which don't pass the depth test due to this draw. For
example, consider this sequence of draws, with depth mode GREATER:
draw A:
z=0.1, fragments pass
draw B:
z=0.4, fragments pass
blend enabled (LRZ write disabled)
depth write enabled
draw C:
z=0.2, fragments don't pass
blend disabled
depth write enabled
Normally looking at the state in draw C, we'd assume we could
enable LRZ write. But this would cause early-z/lrz to discard
fragments from draw A which should be visible due to draw B.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8065
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
Rob Clark [Sat, 14 Jan 2023 18:16:36 +0000 (10:16 -0800)]
freedreno/a6xx: Add LRZ perf warn for ztest direction changes
Add a perf warning when LRZ invalidate happens due to depth test
direction reversal.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
Rob Clark [Sat, 14 Jan 2023 17:31:54 +0000 (09:31 -0800)]
gallium/util: Add util_writes_depth() helper
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
Rose Hudson [Sun, 15 Jan 2023 12:20:07 +0000 (12:20 +0000)]
radeonsi: report 0 block size for Polaris HEVC encoding
makes encoded videos resemble the input again :)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7992
Fixes:
c4482a3c1a9 ("radeonsi/vcn: enable multi-slice encoding")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20714>
Timur Kristóf [Tue, 10 Jan 2023 22:39:42 +0000 (23:39 +0100)]
radv: Make NGG query emission a dirty flag.
Don't emit the NGG query user SGPR if its state doesn't change.
Based on original work by Mike Blumenkrantz.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18819>
Tapani Pälli [Thu, 12 Jan 2023 12:17:12 +0000 (14:17 +0200)]
iris: add restrictions for 3DSTATE_RASTER::AntiAliasingEnable
Field must be disabled if any render targets have integer
format, additionally for Gfx12+ field must be disabled when
num multisamples > 1 or forced multisample count > 1.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7892
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20671>
Tapani Pälli [Fri, 13 Jan 2023 13:52:00 +0000 (15:52 +0200)]
hasvk: add restrictions for 3DSTATE_RASTER::AntiAliasingEnable
Field must be disabled if any render targets have integer format.
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20671>
Tapani Pälli [Thu, 12 Jan 2023 16:33:25 +0000 (18:33 +0200)]
anv: add restrictions for 3DSTATE_RASTER::AntiAliasingEnable
Field must be disabled if any render targets have integer
format, additionally for Gfx12+ field must be disabled when
num multisamples > 1 or forced multisample count > 1.
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20671>
Samuel Pitoiset [Thu, 24 Nov 2022 15:01:45 +0000 (16:01 +0100)]
radv: advertise extendedDynamicState3ColorBlendEquation
This enables full ds3 support with Zink!
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>
Samuel Pitoiset [Fri, 9 Dec 2022 10:16:53 +0000 (11:16 +0100)]
radv: fix detecting that blend is enabled when all CB states are dynamic
It's allowed to be NULL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>
Samuel Pitoiset [Tue, 10 Jan 2023 09:48:01 +0000 (10:48 +0100)]
radv: enable compiling PS epilogs on-demand for dynamic color blend equations
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>
Samuel Pitoiset [Fri, 6 Jan 2023 14:29:44 +0000 (15:29 +0100)]
radv: add support for dynamic blend equation
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>
Samuel Pitoiset [Wed, 18 Jan 2023 07:25:54 +0000 (08:25 +0100)]
radv: add a new helper for normalizing blend factors
It will be also used when compiling PS epilogs on-demand.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>
Samuel Pitoiset [Fri, 25 Nov 2022 08:08:08 +0000 (09:08 +0100)]
radv: move some color blend helpers to radv_private.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>
Martin Roukala (né Peres) [Fri, 20 Jan 2023 07:45:58 +0000 (09:45 +0200)]
zink/ci: add spec@!opengl 1.1@line-smooth-stipple to the fails list
Fixes:
a8d2b288eee3 ("ci/piglit: 2023-01-19 uprev")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20807>
Rohan Garg [Wed, 18 Jan 2023 15:00:24 +0000 (16:00 +0100)]
iris: Don't flush the render cache for a compute batch
Make sure we comply with BSpec and ensure that certain flush flags
are not set for compute batches
Signed-off-by: Rohan Garg's avatarRohan Garg <rohan.garg@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15664>
Danylo Piliaiev [Thu, 19 Jan 2023 18:59:24 +0000 (19:59 +0100)]
tu/kgsl: do not use kgsl_command_object::offset
offset field in kgsl_command_object is NOT used by KGSL, so
we should offset directly to iova.
Fixes weird hangs on KGSL. E.g. fixes the hang in:
dEQP-VK.memory.pipeline_barrier.transfer_dst_storage_texel_buffer.1024
cc: mesa-stable
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20795>
Iván Briano [Thu, 19 Jan 2023 23:23:56 +0000 (15:23 -0800)]
anv: uncompressed views of compressed 3d images are now valid
There was a VUID-VkImageViewCreateInfo-image-04739 in the Vulkan 1.3
spec that said:
If image was created with the
VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag and format is a
non-compressed format, viewType must not be VK_IMAGE_VIEW_TYPE_3D
That VUID has since been removed, and when a view of a 3D image is
created, with put the depth into the array_len, so it won't be always 1.
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20803>
Tatsuyuki Ishi [Sat, 14 Jan 2023 09:30:32 +0000 (18:30 +0900)]
radv: Fix depth-only-with-discard when epilogs are used.
For a depth-only-with-discard pipeline, spi_shader_col_format needs to be
fixed up to a single channel export, or otherwise discard will not work.
Since col_format can change depending on the dynamic state, precompute the
need for this workaround on pipeline creation and apply it when emitting
prolog states.
Fixes:
eb07a11b8f4 ("radv: add support for compiling PS epilogs on-demand")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20704>
Thomas H.P. Andersen [Wed, 18 Jan 2023 21:56:39 +0000 (22:56 +0100)]
meson: use sections in summary()
Makes the list easier to read
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12161>
Thomas H.P. Andersen [Mon, 2 Aug 2021 00:10:11 +0000 (02:10 +0200)]
meson: use summary()
Make use of mesons summary() to create and align the configuration
summary.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12161>
Jesse Natalie [Thu, 19 Jan 2023 00:31:02 +0000 (16:31 -0800)]
dzn: Rework meta blit VS
Some D3D12 drivers, like my PC's AMD driver, don't like using a
dynamic index to load from a constant buffer that's bound via
root constants. Instead, just go ahead and load the full set of
vertex data and just bcsel which one to use.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20778>
Jesse Natalie [Thu, 19 Jan 2023 00:30:23 +0000 (16:30 -0800)]
dzn: Delete an unnecessary assert
As far as I can tell, having multiple levels in the view for a
color target just means to target the first one.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20778>
Jesse Natalie [Thu, 19 Jan 2023 00:29:52 +0000 (16:29 -0800)]
dzn: Enable independent blending
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20778>
David Heidelberg [Thu, 19 Jan 2023 15:09:13 +0000 (16:09 +0100)]
ci: bump ci-fairy with session support (robust downloads)
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
David Heidelberg [Thu, 19 Jan 2023 14:10:23 +0000 (15:10 +0100)]
ci/piglit: 2023-01-19 uprev
Emergency uprev to get robustness against http 50x errors for traces.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
David Heidelberg [Wed, 18 Jan 2023 23:26:03 +0000 (00:26 +0100)]
ci: migrate from wget to curl
Better error handling is more reliable.
Options:
-L, follow location
--retry, number of retries
--retry-all-errors, does not fail on ALL errors, that's why there is -f
-f, fail fast with no output at all on server errors
--retry-delay, make curl sleep this amount of time before each retry
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
David Heidelberg [Thu, 19 Jan 2023 16:37:14 +0000 (17:37 +0100)]
ci/piglit: explicitely define we want GLX tests
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
Dylan Baker [Tue, 17 Jan 2023 18:11:13 +0000 (10:11 -0800)]
meson: use the same workaround for setting 'lib' on windows
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
Dylan Baker [Tue, 17 Jan 2023 18:09:18 +0000 (10:09 -0800)]
meson: use [] instead of 'lib for !windows name_prefix
This is a poorly documented value that uses the default value, but
doesn't emit a warning. In the future Meson will fix this.
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
Dylan Baker [Tue, 17 Jan 2023 17:50:26 +0000 (09:50 -0800)]
meson: use builtin support for reading version from a file
In meson 0.57 support was added for reading a version from a file to
meson natively, so we don't need this workaround anymore.
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
Dylan Baker [Tue, 17 Jan 2023 17:46:41 +0000 (09:46 -0800)]
meson: remove version checks for < 0.59
Which is now required, so these are useless
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
Jesse Natalie [Wed, 11 Jan 2023 21:09:49 +0000 (13:09 -0800)]
dzn: Enable multiview
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 19:03:20 +0000 (11:03 -0800)]
dzn: Implement multiview queries
This is a weird way to do queries, but in multiview, each query
takes up N slots, where N is the number of views. D3D doesn't do
it that way, and only has one result, which fortunately is a valid
way to do Vulkan queries. We just need to take care to zero out
the other view results, and make sure they get "signaled" when
the cmdbuf is submitted.
Note that it is invalid in D3D to use ResolveQueryData on query
slots that have never actually been begun/ended, so we zero out
the data by copying zeroes into the buffer. This probably could
be optimized but oh well.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 19:00:46 +0000 (11:00 -0800)]
dzn: Handle draws and clears for multiview rendering
For draws, when we're emulating multiview, we need to loop them
and set up the right sysval. For clears, we always need to loop.
When not emulating, we also need to set up the right view instance
mask.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 18:57:39 +0000 (10:57 -0800)]
dzn: Handle multiview pipeline creation
This handles both native and emulated pipeline creation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 18:56:10 +0000 (10:56 -0800)]
dzn: Put nir compilation options in a struct
The function signatures are getting unwieldly...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 18:53:55 +0000 (10:53 -0800)]
spirv2dxil: Claim multiview support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 18:53:45 +0000 (10:53 -0800)]
spirv2dxil: Implement lowering for multiview
D3D's view instancing is an optional feature, and even when it's
supported, it only goes up to 4 views, where Vulkan requires a
minimum of 6 supported views. So, we need to have a path for handling
the cases where we can't use the native feature.
In this mode, pass the view ID as a runtime var. The caller is then
responsible for looping the draw calls and filling out the constant
buffer value correctly for each draw. When we get to the last pre-rast
stage, we'll additionally want to write out gl_Layer to select the
right RTV array slice. Lastly, for the fragment shader, if there's
any input attachments, those get loaded using the RTV slice instead
of the view ID. RTV slice input into the PS is done with a signature
entry (which must be output from the previous stage) rather than a
system value.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 18:48:16 +0000 (10:48 -0800)]
spirv2dxil: Pass runtime conf struct to lower_shader_system_values
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 18:46:51 +0000 (10:46 -0800)]
microsoft/compiler: Support view instancing
This adds support for D3D12-native view instancing to the compiler.
Essentially, it's just the ability to load SV_ViewID (dx.op.viewID),
set the right capability, and fill out some more PSV data. Note that
the PSV data is currently garbage. Ideally, we'd fill out a proper
input -> output and viewID -> output dependency table, but AFAIK
this is only used to enforce D3D API validation, and drivers ignore
it, so it's less critical to get it right.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 18:44:51 +0000 (10:44 -0800)]
microsoft/compiler: Delete stale TODO comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 18:44:26 +0000 (10:44 -0800)]
microsoft/compiler: Subpass textures are supposed to be arrays
When doing multiview subpass rendering, they get loaded with the
view/layer index.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 18:43:44 +0000 (10:43 -0800)]
microsoft/compiler: Delete incorrect implementation for load_layer_id
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Mike Blumenkrantz [Thu, 12 Jan 2023 19:27:19 +0000 (14:27 -0500)]
zink: simplify some dynarray concat descriptor code
TIL this exists
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20681>
Mike Blumenkrantz [Thu, 12 Jan 2023 19:49:26 +0000 (14:49 -0500)]
zink: consolidate semaphore creation where possible
all cacheable semaphores should now be using the cache
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20681>
Mike Blumenkrantz [Thu, 12 Jan 2023 19:25:25 +0000 (14:25 -0500)]
zink: move semaphore caching to zink_reset_batch_state()
this makes semaphores available for reuse more rapidly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20681>
Mike Blumenkrantz [Thu, 12 Jan 2023 19:21:20 +0000 (14:21 -0500)]
zink: add a binary semaphore cache
after being waited upon, a binary semaphore can be reused, which saves
tons of present-related ioctls when fps is high
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20681>
Mike Blumenkrantz [Mon, 19 Sep 2022 20:12:57 +0000 (16:12 -0400)]
zink: add a util function for creating semaphores
annoying to keep copy/pasting this around
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20681>
Mike Blumenkrantz [Thu, 19 Jan 2023 18:33:04 +0000 (13:33 -0500)]
zink: preserve present resources during async presentation
ensure that these have a lifetime great enough to be presented
fixes #7781
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20793>
Eric Engestrom [Thu, 19 Jan 2023 18:15:23 +0000 (18:15 +0000)]
ci/bare-metal: add more timestamps to help debugging issues
Acked-by: Emma Anholt <emma@anholt.net>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20792>
Mike Blumenkrantz [Wed, 26 May 2021 15:25:21 +0000 (11:25 -0400)]
zink: NV_compute_shader_derivatives
nothing complicated here
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12120>
Julia Tatz [Mon, 16 Jan 2023 20:34:47 +0000 (15:34 -0500)]
zink: correct sparse bo mem_type_idx placement
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x01 has been incidently the
correct memory type index, but isn't guaranteed to be, which is why it
hasn't caused issues yet
Fixes:
f9515d93 ("zink: allocate/place memory using memoryTypeIndex directly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264>
Julia Tatz [Mon, 16 Jan 2023 18:18:40 +0000 (13:18 -0500)]
zink: trival renames heap_idx -> memoryTypeIndex
Trival renames to correctly identify vulkan memory type indices aren't
the same as zink heaps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264>
Julia Tatz [Mon, 16 Jan 2023 18:09:02 +0000 (13:09 -0500)]
zink: zink_heap isn't 1-to-1 with memoryTypeIndex
Clarify the relationship between zink heaps and vulkan memory type
indices, and resolve the issues from mixing the two up.
Closes: #7588, #7813
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264>
Dylan Baker [Wed, 21 Dec 2022 19:44:55 +0000 (11:44 -0800)]
meson: Use feature option methods for xmlconfig
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
Dylan Baker [Wed, 21 Dec 2022 17:26:25 +0000 (09:26 -0800)]
meson: use a feature option for shared-llvm
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
Dylan Baker [Wed, 21 Dec 2022 01:48:04 +0000 (17:48 -0800)]
meson: use a feature option for egl
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
Dylan Baker [Wed, 21 Dec 2022 00:37:35 +0000 (16:37 -0800)]
meson: use a feature option for zstd
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
Dylan Baker [Wed, 21 Dec 2022 00:36:46 +0000 (16:36 -0800)]
meson: use a feature option for xlib-lease
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
Dylan Baker [Wed, 21 Dec 2022 00:06:10 +0000 (16:06 -0800)]
meson: use a feature option for power8
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
Dylan Baker [Tue, 20 Dec 2022 23:43:55 +0000 (15:43 -0800)]
meson: use a feature option for lmsensors
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>