Mike Blumenkrantz
27d405dc2f
zink: clamp tbo creation to maxTexelBufferElements
...
for sparse buffers, the total buffer size will be huge, so this needs
to only be the limit that the driver can support to avoid crashing
or whatever
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14692 >
2022-01-31 03:34:09 +00:00
Mike Blumenkrantz
fa74a6c554
zink: ci updates
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14745 >
2022-01-30 19:18:45 +00:00
Mike Blumenkrantz
90bf30d7e4
zink: make pipe_buffer_write usage trigger compiler errors
...
don't want to have to hunt this down ever again
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14745 >
2022-01-30 19:18:45 +00:00
Mike Blumenkrantz
c9a0919499
zink: replace other pipe_buffer_write usage with pipe_buffer_write_nooverlap
...
this is just to be consistent and avoid any pipe_buffer_write() usage
so that grep won't find it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14745 >
2022-01-30 19:18:45 +00:00
Mike Blumenkrantz
3402558b47
zink: replace qbo pipe_buffer_write usage with tc_buffer_write
...
this fixes flakiness with qbo readback due to the buffer being internally
invalidated without tc being aware of it
fixes:
KHR-GL46.direct_state_access.queries_functional
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14745 >
2022-01-30 19:18:45 +00:00
Lucas Stach
a40a6e551e
etnaviv: draw: only mark resources as read/written when the state changed
...
If the relevant state for a resource has not been dirtied between the
last and the current draw, we don't need to mark the resource as read
or written, as they are guaranteed to be marked already by the last draw.
This saves quite a bit of hashset operations for the resource tracking
in draw heavy workloads.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14791 >
2022-01-30 13:28:21 +00:00
Thomas H.P. Andersen
37989670b9
microsoft/compiler: fix -Wbitwise-instead-of-logical warning
...
Replace the bitwise operation with a more explicit do-while
loop. This fixes a warning with clang, and ensures that
nir_opt_dead_cf and nir_opt_dce are called in the right
order.
Suggested-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14742 >
2022-01-30 05:05:38 +00:00
Christian Gmeiner
708a33d132
etnaviv: fix FRONT_AND_BACK culling
...
HW has no value to cull both faces (setting both CW/CCW bits results in
only CCW being culled). The blob just skips triangle draws when FRONT_AND_BACK
culling is enabled. Lets do the same in draw_vbo(..).
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14779 >
2022-01-29 16:28:09 +00:00
Marcin Ślusarz
24fef8f33d
intel/compiler: Use Task/Mesh InlineData for the first few push constants
...
Replace load_mesh_global_arg_addr_intel with a more general intrinsic
load_mesh_inline_data_intel, since inline data now hold both
a pointer descriptor information and the first few push constants.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14788 >
2022-01-29 06:32:19 +00:00
Marcin Ślusarz
1d9f47325b
intel/compiler: handle gl_[Clip|Cull]Distance from mesh in fragment shaders
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14788 >
2022-01-29 06:32:19 +00:00
Marcin Ślusarz
baa17865de
intel/compiler: handle gl_[Clip|Cull]Distance in mesh shaders
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14788 >
2022-01-29 06:32:19 +00:00
Caio Oliveira
856a0cacb1
intel/compiler: Merge Per-Primitive attribute handling in Mesh case
...
Just a refactor, no behavior change.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14788 >
2022-01-29 06:32:19 +00:00
Caio Oliveira
2b8b884bcd
intel/compiler: Have specific mesh handling in calculate_urb_setup()
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14788 >
2022-01-29 06:32:19 +00:00
Paulo Zanoni
83788b864d
iris: sprinkle some assertions for bufmgr->lock
...
Assert the lock is held when we need it to be held. Also hold the lock
during bufmgr destruction to keep the asserts happy.
Now the only place where we're not holding the lock while manipulating
bufmgr data structures is iris_bufmgr_create(), but this shouldn't
trigger any of the new assertions.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13486 >
2022-01-29 05:00:51 +00:00
Paulo Zanoni
6f5af78e25
iris: improve error checking in functions that call vma_alloc()
...
On these functions, for vm_bind I want to add another function call
that can fail and needs to be handled. As a preparation for that, add
real error checks around vma_alloc() and try to fix some of the other
error-related issues in these functions. This way, it will be much
simpler to just drop the new vm_bind-related function calls and error
handling code.
My fear is that having vma-related errors (and in the future
vm_bind-related errors) go unannounced may create some hard-to-debug
bugs.
v2: Unlock only after bo_free() (Marcin Ślusarz).
v3: Prefer goto over early returns (Marcin Ślusarz).
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13486 >
2022-01-29 05:00:51 +00:00
Caio Oliveira
8599ded193
intel: Only reserve space for Compute Engine out of URB in Gfx12LP
...
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14756 >
2022-01-28 14:52:17 -08:00
Chia-I Wu
c3a74e10f9
venus: updates to the doc
...
VIRTGPU_PARAM_CONTEXT_INIT has been upstreamed. Misc updates to reflect
the current status.
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14777 >
2022-01-28 20:13:49 +00:00
Yiwei Zhang
3f9eb4fdf4
venus: make vn_QueueSubmit async for native submissions
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14657 >
2022-01-28 19:15:52 +00:00
Yiwei Zhang
15e7750446
Revert "venus: remove vn_ring_wait_all"
...
This reverts commit 7253e61d9d .
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14657 >
2022-01-28 19:15:52 +00:00
Yiwei Zhang
5ba9309c29
venus: track whether a fence is external
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14657 >
2022-01-28 19:15:52 +00:00
Yiwei Zhang
088ea93a59
venus: update some obsolete assumptions described
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14657 >
2022-01-28 19:15:52 +00:00
Christian Gmeiner
be5b0e08fa
etnaviv: make use of nir_lower_tex_shadow
...
Also force the texture filter to nearest when the lowering
is used.
This enables the GL_ARB_shadow extension for all GPU models.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14308 >
2022-01-28 18:40:53 +00:00
Christian Gmeiner
e5f9cdac1f
nir/nir_lower_tex_shadow: support tex_instr without deref src
...
Use texture_index if there is no deref src.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14308 >
2022-01-28 18:40:53 +00:00
Christian Gmeiner
e67bca3fe7
nir: make lower_sample_tex_compare a common pass
...
This pass was originally written for d3d12, but is useful for hardware
that lacks sample compare support like some etnaviv GPU models.
Also rename the lowering pass and some surrounding code to
nir_lower_tex_shadow as suggested by Emma.
I'd like to use the pass that's already in tree.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14308 >
2022-01-28 18:40:53 +00:00
Alyssa Rosenzweig
a78861b0fb
docs/panfrost: Add new Midgard/Bifrost chips
...
These should be fine. It's only the early chips that are too broken to see the
light of day.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14726 >
2022-01-28 17:47:46 +00:00
Alyssa Rosenzweig
0b16bf370e
panfrost: Add Mali-G51 support
...
Just to prove it can be done in one line now :-)
Thanks to Robin Murphy for breaking out the ol' FPGA.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14726 >
2022-01-28 17:47:46 +00:00
Alyssa Rosenzweig
33399e95ae
pan/bi: Assume future Valhall is 16-wide warps
...
This is true for v10 at least, per the public data sheet. It seems like a
reasonable default going forward to eliminate a special case.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14726 >
2022-01-28 17:47:46 +00:00
Alyssa Rosenzweig
8f0b5b4b19
pan/bi: Clean up quirks
...
NO_PRELOAD isn't actually used. The other quirks are used, but they're
implementation details only affecting a few older models. So we can default to
no quirks and clean up a lot.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14726 >
2022-01-28 17:47:46 +00:00
Alyssa Rosenzweig
94bb229c46
panfrost: Get performance counters from table
...
Avoids yet another open-coded list of GPU IDs.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14726 >
2022-01-28 17:47:46 +00:00
Alyssa Rosenzweig
5e808f7b0a
panfrost: Make the GPU allowlist implicit
...
Allowlist a GPU if and only if it has a model definition in-tree. This replaces
the explicit allowlist, which is somewhat cumbersome to maintain.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14726 >
2022-01-28 17:47:46 +00:00
Alyssa Rosenzweig
8c01a8a263
panfrost: Replace panfrost_model_name with model->name
...
One less place to update GPU IDs.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14726 >
2022-01-28 17:47:46 +00:00
Alyssa Rosenzweig
6c0d433d19
panfrost: Centralize our model list
...
Replaces panfrost-quirks.h
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14726 >
2022-01-28 17:47:46 +00:00
Alyssa Rosenzweig
2b638c1eb3
panfrost: Don't pass quirks to pan_lower_framebuffer
...
There is a single quirk it cares about. Pass just that, so the relevant quirk
can be made a Midgard compiler quirk and not a global Panfrost quirk.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14726 >
2022-01-28 17:47:46 +00:00
Alyssa Rosenzweig
2b699d0650
panfrost: Fix v9 "Stencil from shader" bit
...
Typo.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Fixes: 96acad5cd5 ("panfrost: Add XML for Valhall data structures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14776 >
2022-01-28 17:30:37 +00:00
Alyssa Rosenzweig
23d52b47f1
panfrost: Make primary_shader boolean
...
Fixes: 96acad5cd5 ("panfrost: Add XML for Valhall data structures")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14776 >
2022-01-28 17:30:37 +00:00
Christian Gmeiner
52b36cb790
isaspec: Add support for special {:align=} field
...
Make it possible to just do alignment handling without an
actual field to print.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14668 >
2022-01-28 16:33:18 +00:00
Mike Blumenkrantz
42ae116ac7
zink: fix vertex buffer mask computation for null buffers
...
off by N
affects:
KHR-GL46.texture_cube_map_array.sampling
Fixes: 53aade0ef0 ("zink: fix enabled vertex buffer mask calculation")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14721 >
2022-01-28 15:53:43 +00:00
Mike Blumenkrantz
143c156409
aux/tc: add tc_buffer_write to replace pipe_buffer_write usage
...
tc_buffer_write is the tc-safe version of this function which will
avoid accidental invalidations that break behavior
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14770 >
2022-01-28 14:58:20 +00:00
Mike Blumenkrantz
be5311972f
zink: remove tmp buffer rebinds
...
this is no longer used/necessary
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14689 >
2022-01-28 14:40:31 +00:00
Mike Blumenkrantz
5c28afdc7f
zink: simplify buffer case for zink_resource_object_init_storage()
...
this is a no-op, but leave the case to simplify the caller
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14689 >
2022-01-28 14:40:31 +00:00
Mike Blumenkrantz
bfde221952
zink: flag all buffer resources with PIPE_BIND_SHADER_IMAGE
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14689 >
2022-01-28 14:40:31 +00:00
Mike Blumenkrantz
93edc63250
zink: use the storage buffer for bufferview creation when format allows
...
this avoids issues where a buffer created for storage can't be used
for texturing due to having the storage bit
fixes (anv):
KHR-GL46.texture_buffer.texture_buffer_texture_buffer_range crash -> fail
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14689 >
2022-01-28 14:40:31 +00:00
Mike Blumenkrantz
94afa1632f
zink: always create a separate VkBuffer for storage use
...
bufferview objects must be created with or without the storage bit as
the driver permits, so create two buffer objects that can be used as needed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14689 >
2022-01-28 14:40:31 +00:00
Mike Blumenkrantz
3e12cb9ad9
zink: use VkImageViewUsageCreateInfo to remove attachment bits
...
this avoids issues where the driver may not support attachment bits
for texture views
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14719 >
2022-01-28 14:23:51 +00:00
Mike Blumenkrantz
c639e82f18
zink: allow resource creation without VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
...
as long as this isn't multisampled, it should be okay since it could be used
with texture_subdata
fixes (anv):
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.conversion_gpu
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.enabled
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.multiple_textures
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.skipped
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.texel_fetch
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.toggled
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.using_sampler
dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_linear
dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_linear_mipmap_linear
dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_linear_mipmap_nearest
dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_nearest
dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_nearest_mipmap_linear
dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_nearest_mipmap_nearest
dEQP-GLES31.functional.texture.format.sized.cube_array.srgb_r8_npot
dEQP-GLES31.functional.texture.format.sized.cube_array.srgb_r8_pot
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14719 >
2022-01-28 14:23:51 +00:00
Mike Blumenkrantz
d4720c65ac
zink: flag has_work when a GL semaphore is signalled
...
this is an async flush, so it has to have this flag set or else
the subsequent (also async) flush won't do anything
Fixes: 32597e116d ("zink: implement GL semaphores")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14740 >
2022-01-28 14:02:48 +00:00
Mike Blumenkrantz
794fabc8c2
zink: emit same number of timeline signals as semaphore signals
...
spec requires these counts/arrays to match, and I did match them, but
it was only in my kopper branch, which didn't propagate back to the
original implementation
Fixes: 32597e116d ("zink: implement GL semaphores")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14740 >
2022-01-28 14:02:48 +00:00
Iago Toral Quiroga
5974949c0d
v3dv: expose VK_KHR_depth_stencil_resolve
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14752 >
2022-01-28 12:25:43 +00:00
Iago Toral Quiroga
668653f830
v3dv: fallback to blit resolve if render area is not aligned to tile boundaries
...
Just as with all other TLB operations, we can only use the TLB if the render
area is aligned to tile boundaries. If it is not, then the operation would
overwrite pixels outside the render area, which is not allowed.
In this case, we can't even emit a previous TLB load to fix this because the
TLB has the multisampled attachment, not the resolve attachment, which is
just a destination buffer for the tile store.
Because the condition for tile alignment has to be determined for each
subpass, we handle this by storing this information in the attachment
state of the command buffer with the start of each subpass. We store
whether the attachment is to be resolved and whether it can use the
TLB (considering tile alignment restrictions).
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14752 >
2022-01-28 12:25:43 +00:00
Iago Toral Quiroga
7f87a1256e
v3dv: support resolving depth/stencil attachments
...
This implements the bulk of VK_KHR_depth_stencil_resolve
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14752 >
2022-01-28 12:25:43 +00:00