Commit Graph

152671 Commits

Author SHA1 Message Date
Emma Anholt c5cc9ed29b virgl: Switch to nir-to-tgsi by default.
With !8044 all TGSI drivers will end up going through the nir-to-tgsi
path, so make the switch now that CI is happy (which will also make sure
that future NTT work doesn't break virgl).

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13295>
2022-04-21 18:27:35 +00:00
Emma Anholt 337b3dabc0 tgsi: Extend array lengths when merging usage_masks.
With nir-to-tgsi, virgl saw a case where a previous declaration of array
.x and scalar .y (turning into an array with .xy) ended up being a
declaration of scalar .x and array .y (turning into a scalar with .xy).
Make sure we extend the declared array length as well.

One might think that the fix would be to union the .first/.last between
the two declarations being merged, but note that ureg_DECL_output() passes
in the current nr_output_regs as the index, so the .last would end up
getting extended for those callers (such as nir_to_tgsi fs outputs) every
time you merged.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13295>
2022-04-21 18:27:35 +00:00
Emma Anholt 4205039a9f nir_to_tgsi: Lower FS input array indexing since we don't declare input arrays.
We can't declare input arrays because mesa/st lowers NIR VS output
declarations to elements no matter what, and virgl has depended on
matching array sizes of declarations between producers and consumers.  So,
we have to lower it away (which is fine because hardware drivers will
generally be lowering anyway).

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13295>
2022-04-21 18:27:35 +00:00
Gert Wollny e6d262a7fa virgl: Clear all indirect flags when writing to a temporary
The output may be an array, e.g. with a TCS shader, so if the
value is written to a temporaray first remove the indirect
indicator for that write.

Fixes: 36f12c85c8
   virgl: Extend integer write out output fix to all non-move integers ops

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13295>
2022-04-21 18:27:35 +00:00
Lionel Landwerlin 9f44a26462 nir/divergence: handle load_global_block_intel
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: dd39e311b3 ("nir: Add nir_intrinsic_{load,store}_deref_block_intel")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16075>
2022-04-21 17:41:04 +00:00
Gert Wollny a501b3b614 ntt: Split 64 bit vec3 and vec4 local variables and phis
Fixes virgl with with ntt:
   spec@arb_enhanced_layouts@execution@component-layout@vs-fs-array-dvec3
   spec@arb_gpu_shader_fp64@uniform_buffers@fs-array-copy
   spec@arb_gpu_shader_fp64@uniform_buffers@gs-array-copy
   spec@arb_gpu_shader_fp64@uniform_buffers@vs-array-copy
   spec@arb_gpu_shader_fp64@execution@gs-fs-vs-double
   spec@arb_gpu_shader_fp64@execution@built-in-functions@fs-frexp-dvec4-variable-index
   spec@arb_gpu_shader_fp64@execution@explicit-location-gs-fs-vs
   spec@arb_gpu_shader_fp64@execution@built-in-functions@fs-frexp-dvec4-variable-index

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15945>
2022-04-21 16:57:11 +00:00
Gert Wollny 496fd59d71 nir: Add pass to split 64 bit vec3 and vec4 variable access and phis
NTT can't convert local 64 variables of type vec3 or vec4, therefore,
they need to be split into vec2 + double or vec2 + vec2.

At the same time deal splitting the phi nodes.

The pass goes into the global namespace because it is also useful
for r600.

v2: only lower function_temps (Emma) and handle array of arrays (Jason)

v3: - remove bool parameter in function to merge
      vec3 and vec4
    - simplify load/store_deref_(array|var)
    - use a pointer hash table
    - simplify PHI splitting (all Emma)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15945>
2022-04-21 16:57:11 +00:00
Filip Gawin d48c10fab3 r300: Print warning when stubbing derivatives
Fixes: e1c640c3a4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14669>
2022-04-21 16:49:53 +00:00
Daniel Stone 68e8f00c44 ci/zink: Add glx-tfp to skips
glx-tfp is broken since Kopper, and periodically either fails or
crashes; we seemingly can't quite deal with the change between the two.
Just skip it for now.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16082>
2022-04-21 16:35:02 +00:00
Martin Roukala (né Peres) c9214768fa radv/ci: add a Van Gogh dEQP runner
Vangogh is the codename of the custom APU found in the Steam Deck.
As it only has 4 Zen2 cores and a 15W TDP, don't expect fast runs
until we get more of them in CI :)

Just like the Renoir and one of the NAVI10 runners, this VanGogh
runner is hosted in my CI farm, behind a couple of UPSes.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Charlie Turner <cturner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15555>
2022-04-21 15:15:53 +00:00
Martin Roukala (né Peres) 669a3f3991 ci/b2c: update b2c to enable monitoring support
By enabling monitoring, we can collect all kind of metrics such as
CPU/Memory/Disk usage during execution, allowing us to detect
bottlenecks.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Charlie Turner <cturner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15555>
2022-04-21 15:15:53 +00:00
Martin Roukala (né Peres) e38d23a396 ci/b2c: bump the kernel to 5.17.1
This new kernel also brings support for sensors, which makes will
enable us to monitor metrics during the execution of tests.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Charlie Turner <cturner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15555>
2022-04-21 15:15:53 +00:00
Martin Roukala (né Peres) c672464844 ci/b2c: fix the generation of the IMAGE_UNDER_TEST variable
The `IMAGE_UNDER_TEST` variable set in `.b2c-test` got broken with
the merge of 7d474c1 (ci: Move most stuff out of root .gitlab-ci.yml).

During the shuffling, the `MESA_BASE_TAG` and `MESA_IMAGE_TAG`
variables were dropped, leading to `IMAGE_UNDER_TEST` being an
unexisting container.

To make this issue less likely to happen in the future, this patch
drops the code duplication that led to `IMAGE_UNDER_TEST` to be
the same as `MESA_IMAGE` and instead re-uses .use-debian/x86_test-vk
to generate `MESA_IMAGE`, which we then use verbatim in
`IMAGE_UNDER_TEST`.

The renaming is `MESA_IMAGE` into `IMAGE_UNDER_TEST` there to make the
distinction clear between the image run by gitlab-runner (what is
usually called `MESA_IMAGE` but we instead hardcode to valve-infra's
trigger container), and the image we are running on the test machines.

Fixes: 7d474c1 (ci: Move most stuff out of root .gitlab-ci.yml)
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Charlie Turner <cturner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15555>
2022-04-21 15:15:53 +00:00
Yonggang Luo ea7cda93f3 misc: replace `#ifdef\s\s__cplusplus` with `#ifdef\s__cplusplus`
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15762>
2022-04-21 14:43:39 +00:00
Yonggang Luo 9aa094d1b1 misc: Replace `#ifdef\t__cplusplus` with `#ifdef\s\s__cplusplus`
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15762>
2022-04-21 14:43:39 +00:00
Erik Faye-Lund 30aab0af07 nir/lower_int64: do not try to clamp floats to int-range
The clamping isn't correct, because the exact values ended up getting
rounded off a bit when converting back to floats.

But, converting floats to integers have undefined results when the
float value doesn't fit in the integer. So let's not try to clamp the
value here.

This was caught by digging at a Clang warning, see this thread for
details:

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15547#note_1329769

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16022>
2022-04-21 14:12:34 +00:00
Alexey Bozhenko 25acf1d869 spirv: fix OpBranchConditional when both branches are the same
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6246

Signed-off-by: Bozhenko Alexey <oleksii.bozhenko@globallogic.com>

Fixes: 64cb143b92 ("spirv: Fix handling of OpBranchConditional with same THEN and ELSE")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15929>
2022-04-21 13:41:24 +00:00
Dave Airlie 4b7ba3869b util/stencil: fix stencil fallback blit shader texture types.
src/gallium/auxiliary/tgsi/tgsi_scan.c:287: scan_src_operand: Assertion `info->sampler_targets[index] == target' failed.
assert was being triggered by
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit
using the stencil fallback with zink.

Fixes: f05dfddeb1 ("u_blitter: fix stencil blit fallback for crocus.")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16069>
2022-04-21 13:01:53 +00:00
Dave Airlie dbc264f504 u_blitter/stencil: take dstbox x/y into accounts for dst fb width
When setting the dst framebuffer width height, it might be silly
to constrain this beyond the dst resource, but at least constrain
it correctly to take account of x/y offsets.

This fixes some uses of this as a fallback for zink with
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_stencil_blit

Fixes: b4c07a8a87 ("gallium/util: allow scaling blits for stencil-fallback")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16069>
2022-04-21 13:01:53 +00:00
Frank Binns e0e5cbd5a4 pvr: replace p_compiler.h boolean with stdbool
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16037>
2022-04-21 12:52:52 +00:00
Daniel Stone ec4baed0ee ci/windows: Eliminate duplicate script definition
We already get this from the base we extend from.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16077>
2022-04-21 11:32:06 +00:00
Daniel Stone 0606c7b0db ci: Also disable Windows container builds when down
Unlike all the other test configurations, we also want to drop the
Windows container build when our Windows machines aren't available.
Missed in !16055.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16077>
2022-04-21 11:32:06 +00:00
Daniel Stone f2ddd59bf6 ci: Allow lima jobs to be globally disabled
This is useful in situations like right now, where the boards are dead.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16077>
2022-04-21 11:32:06 +00:00
Erik Faye-Lund 4300b5d914 dzn: remove stale cpp_args
We no longer use C++, so we don't need to set cpp_args here.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16076>
2022-04-21 11:21:06 +00:00
Erik Faye-Lund 85d0d3fede dzn: fixup indent
This seems to be all tab-indents we have in our code-base.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16076>
2022-04-21 11:21:06 +00:00
Erik Faye-Lund dee89ea027 dzn: drop needless enum-casts
After rewriting to C, we also don't need these casts.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16076>
2022-04-21 11:21:06 +00:00
Vadym Shovkoplias 785b6579ae anv: Fix geometry flickering issue when compute and 3D passes are combined
Call flush_pipeline_select_3d in CmdBeginRendering() to emit a dummy MEDIA_VFE_STATE
before switching from GPGPU to 3D.

Original commit with the fix:
bc612536 ("anv: Emit a dummy MEDIA_VFE_STATE before switching from GPGPU to 3D")

Fixes: 3501a3f9ed ("anv: Convert to 100% dynamic rendering")
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6201
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15954>
2022-04-21 11:00:07 +00:00
Erik Faye-Lund f854e6ec9b dzn: add space before += operator
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16052>
2022-04-21 10:52:44 +00:00
Erik Faye-Lund 52cde4a1ad dzn: clean up pointer syntax
The code-style we use have a space before the first asterisk for
pointers. Fix a few inconsistencies.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16052>
2022-04-21 10:52:44 +00:00
Erik Faye-Lund 92964d2bfd dzn: remove some needless casts
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16052>
2022-04-21 10:52:44 +00:00
Boris Brezillon b8d41d5919 dzn: Add support for KHR_descriptor_update_template
Create update templates where the offset in the descriptor heap is
pre-calculated.

Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15691>
2022-04-21 10:43:31 +00:00
Boris Brezillon 4da5524c9b dzn: Split the write desc helpers in two halves
Split the write desc helpers in two halves, one taking a descriptor
offset directly, and the other one taking a descriptor set pointer.

This will allow us to pre-calculate descriptor offsets when creating
a descriptor_update template and speed up a bit the write step in that
case.

Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15691>
2022-04-21 10:43:30 +00:00
Boris Brezillon 31dc341f3a dzn: Pass layout objects to various dzn_descriptor_set_ptr_xxx helpers
Needed if we want to support KHR_descriptor_update_template, since
we won't have access to the final descriptor set when calculating heap
offsets in that case.

Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15691>
2022-04-21 10:43:30 +00:00
Boris Brezillon fe68cfe82a dzn: Rename a bunch of dzn_descriptor_set helpers
Let's be consistent with other helpers taking a dzn_descriptor_set_ptr
object and prefix all such functions with dzn_descriptor_set_ptr_.

We also rename dzn_descriptor_set_ptr_get_desc_vk_type() into
dzn_descriptor_set_ptr_get_vk_type() to shorten it a bit.

Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15691>
2022-04-21 10:43:30 +00:00
Jordan Justen d257494ec4 intel/dev: Add device info for RPL-P
Cc: mesa-stable
Ref: https://patchwork.freedesktop.org/series/102701/
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16054>
2022-04-21 01:32:53 -07:00
Boris Brezillon 3af6631c6d dzn: Add support for EXT_vertex_attribute_divisor
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15915>
2022-04-21 00:31:18 -07:00
Boris Brezillon d01a149b8b ci/windows: Split the windows-related tests
Should help with the timeouts we see in CI right now.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16042>
2022-04-20 23:45:28 -07:00
Boris Brezillon cf930db39c d3d12: Move the D3D12ResourceState code to the gallium driver
It's only used there, and we don't plan to use it in Dozen, so let's move
the code to src/gallium/drivers/d3d12/ and get rid of the static
d3d12_resource_state library.

Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16042>
2022-04-20 23:45:28 -07:00
Michael Olbrich 5c4906dc0f crocus: export GEM handle with RDWR access rights
Without this, it is impossible to export gem handles with write access.

This was fixed the same way for
i965 (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10850) and
iris (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10851).

Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>`
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16057>
2022-04-21 07:11:31 +02:00
Mike Blumenkrantz 092ac67bb9 zink: unset PIPE_CAP_MULTI_DRAW_INDIRECT_PARTIAL_STRIDE
by the time this gets to the driver, it's really awful to solve,
so have the frontend solve it

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15963>
2022-04-21 02:29:09 +00:00
Mike Blumenkrantz 0f28da9cd4 gallium: add PIPE_CAP_MULTI_DRAW_INDIRECT_PARTIAL_STRIDE
GL spec states that the stride for indirect multidraws:
* cannot be negative
* can be zero
* must be a multiple of 4

some drivers can't support strides which are not a multiple of the
size of the indirect struct being used, however, so rewrite those to
direct draws

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15963>
2022-04-21 02:29:09 +00:00
Mike Blumenkrantz ec12491620 util/draw: fix indirect draw count readback
if there is an indirect count, always use it

Fixes: 3eb9932317 ("aux/draw: add a util function for reading back indirect draw params")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15963>
2022-04-21 02:29:09 +00:00
Mike Blumenkrantz 07437fa3bd util/draw: handle draw_count=0 when reading indirect parameters
Fixes: 3eb9932317 ("aux/draw: add a util function for reading back indirect draw params")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15963>
2022-04-21 02:29:09 +00:00
Mike Blumenkrantz efca37d415 util/draw: fix map size of indirect buffer in util_draw_indirect_read
this was incorrectly calculating too small of a map region if
the stride was less than the size of the struct

Fixes: 3eb9932317 ("aux/draw: add a util function for reading back indirect draw params")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15963>
2022-04-21 02:29:09 +00:00
Yiwei Zhang 31727f114a venus: use linear modifier for legacy common wsi path
Towards the renderer, venus better uses VK_EXT_image_drm_format_modifier
to force linear with tiling modifier and mod_linear. Doing so won't make
any difference on the mesa implementations we care about given we have
required VK_EXT_image_drm_format_modifier for wsi support.

A lucky side effect of this is to allow common wsi to work with host
implementations not supporting dma_buf export.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15993>
2022-04-21 01:29:21 +00:00
Yiwei Zhang 09cee71e80 venus: override aspectMask for internal tiling modifier
WSI images and Android AHBs can have tiling modifier overrides, thus we
must override the aspectMask upon image subresource layout query.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15993>
2022-04-21 01:29:21 +00:00
Mike Blumenkrantz d7256043b3 zink: handle device-local unsynchronized maps
this is only possible when tc determines the buffer is not in use
and decides to return a pointer immediately, so just give back a staging
buffer

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15979>
2022-04-21 00:48:19 +00:00
Mike Blumenkrantz e509598470 zink: remove xfb_barrier flag
this was an attempt to minimize the number of xfb barriers being emitted,
but really xfb barriers need to always be emitted in order for xfb to work

cc: mesa-stable

fixes (nv):
KHR-GL46.texture_view.reference_counting
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
2022-04-21 00:27:50 +00:00
Mike Blumenkrantz fc5edf9b68 zink: fix xfb counter buffer barriers
a read barrier is needed for resume, yes, but the counter buffer
is always being written to, so write access must always be set

cc: mesa-stable

fixes (nv):
KHR-GL46.transform_feedback.draw_xfb_test

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
2022-04-21 00:27:50 +00:00
Mike Blumenkrantz a056cbc691 zink: fix synchronization when drawing from streamout
this was well-documented, but ultimately wrong: the synchronization
being used was for binding streamout buffers (not counter buffers) as
vertex buffers, which was already handled just fine in the normal
vertex buffer binding

drawing from streamout ONLY uses the counter buffer, which means
the counter buffer needs to be synchronized for reading

cc: mesa-stable

fixes (nv):
KHR-GL46.transform_feedback.draw_xfb_feedbackk_test
KHR-GL46.transform_feedback.draw_xfb_instanced_test
KHR-GL46.transform_feedback.draw_xfb_stream_instanced_test

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
2022-04-21 00:27:50 +00:00