Marek Olšák
c00db0dbc8
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 >
2023-01-20 21:34:09 -05:00
Marek Olšák
ed7d3b33b0
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 >
2023-01-20 21:34:09 -05:00
Marek Olšák
fc93c69701
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 >
2023-01-20 21:34:09 -05:00
Marek Olšák
68a926a15b
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 >
2023-01-20 21:34:09 -05:00
Marek Olšák
e39b90311c
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 >
2023-01-20 21:34:09 -05:00
Marek Olšák
777166cc66
glthread: handle GL_*_ARRAY in glEnable/Disable
...
Surprisingly, the GL compatibility profile allows these in both
glEnableClientState and glEnable.
Fixes: 0b1dd18591
- 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 >
2023-01-20 21:34:09 -05:00
Marek Olšák
a4d813ba54
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 >
2023-01-20 21:34:09 -05:00
Marek Olšák
721526227c
mesa: allow GL_UNSIGNED_INT64_ARB as vertex format for ARB_bindless_texture
...
This wasn't implemented, but the spec requires it.
Fixes: 1fe7b1f972
- 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 >
2023-01-20 21:34:09 -05:00
Marek Olšák
4f6e785876
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: 068a3bf0d7
- 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 >
2023-01-20 21:34:09 -05:00
Marek Olšák
4d4995b32b
glthread: fix an upload buffer leak
...
Fixes: befbd54864
- 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 >
2023-01-21 01:38:27 +00:00
Lionel Landwerlin
6f02f9d108
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 >
2023-01-20 22:35:41 +02:00
Mike Blumenkrantz
b3fd72fd09
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 >
2023-01-20 19:43:43 +00:00
Mike Blumenkrantz
46e2cc5d4c
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 >
2023-01-20 19:43:43 +00:00
Mike Blumenkrantz
8fc5d93060
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 >
2023-01-20 19:43:43 +00:00
Mike Blumenkrantz
f9ff2d9d07
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 >
2023-01-20 19:43:43 +00:00
Mike Blumenkrantz
83c290ff84
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 >
2023-01-20 19:43:43 +00:00
Jesse Natalie
bfd891fe66
dzn: Support basic subgroups
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20777 >
2023-01-20 18:50:57 +00:00
Jesse Natalie
33f59578fa
spirv2dxil: Support basic subgroups
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20777 >
2023-01-20 18:50:57 +00:00
Jesse Natalie
8872d5d1dc
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 >
2023-01-20 18:50:57 +00:00
Jesse Natalie
2f8a8b5949
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 >
2023-01-20 18:50:57 +00:00
Jesse Natalie
a422df4b61
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 >
2023-01-20 18:50:57 +00:00
Jesse Natalie
142faf894b
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 >
2023-01-20 18:50:57 +00:00
Mike Blumenkrantz
5d44318566
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 >
2023-01-20 18:33:07 +00:00
Mike Blumenkrantz
b4d18f2ad1
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 >
2023-01-20 18:33:07 +00:00
José Roberto de Souza
c1d99283e6
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 >
2023-01-20 17:26:08 +00:00
José Roberto de Souza
b3b769894e
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 >
2023-01-20 17:26:08 +00:00
José Roberto de Souza
1332702cf4
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 >
2023-01-20 17:26:08 +00:00
Samuel Pitoiset
473732dfd1
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 >
2023-01-20 17:07:26 +00:00
Rob Clark
1c82981bbe
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 >
2023-01-20 16:18:03 +00:00
Rob Clark
b392d57042
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 >
2023-01-20 16:18:03 +00:00
Rob Clark
720c842c50
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 >
2023-01-20 16:18:03 +00:00
Rob Clark
899f2218fe
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 >
2023-01-20 16:18:03 +00:00
Rob Clark
0e1bdd0057
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 >
2023-01-20 16:18:03 +00:00
Rob Clark
c1b1b3e6ab
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 >
2023-01-20 16:18:03 +00:00
Rob Clark
65e5b8e413
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 >
2023-01-20 16:18:03 +00:00
Rose Hudson
e8a60633da
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: c4482a3c1a
("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 >
2023-01-20 15:07:31 +00:00
Timur Kristóf
08f6d14b85
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 >
2023-01-20 14:31:45 +00:00
Tapani Pälli
247c06d419
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 >
2023-01-20 12:50:04 +00:00
Tapani Pälli
58dd9d5134
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 >
2023-01-20 12:50:04 +00:00
Tapani Pälli
9b37ef40f8
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 >
2023-01-20 12:50:04 +00:00
Samuel Pitoiset
f42521f6c3
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 >
2023-01-20 11:55:07 +00:00
Samuel Pitoiset
de1e2b65db
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 >
2023-01-20 11:55:07 +00:00
Samuel Pitoiset
4041be0f6f
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 >
2023-01-20 11:55:07 +00:00
Samuel Pitoiset
daa2aeaa0c
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 >
2023-01-20 11:55:06 +00:00
Samuel Pitoiset
11382a6711
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 >
2023-01-20 11:55:06 +00:00
Samuel Pitoiset
39dcac4f79
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 >
2023-01-20 11:55:06 +00:00
Martin Roukala (né Peres)
f7dd9e5806
zink/ci: add spec@!opengl 1.1@line-smooth-stipple to the fails list
...
Fixes: a8d2b288ee
("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 >
2023-01-20 11:29:03 +00:00
Rohan Garg
ec6ad8c7dc
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 >
2023-01-20 11:09:24 +00:00
Danylo Piliaiev
926f626b95
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 >
2023-01-20 10:50:20 +00:00
Iván Briano
58ababdee6
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 >
2023-01-20 08:41:59 +00:00