now that batches aren't limited and flushing is less costly, there's no
reason to keep these separate
the primary changes here are removing the zink_queue enum and collapsing
related arrays which used it as an index, e.g., zink_batch_usage into single
members
remaining future work here will include removing synchronization flushes which
are no longer necessary and (eventually) removing batch params from a number of
functions since there is now only ever a single batch
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9765>
this avoids (future) issues with desync due to long-lived fences which
may not yet have completed at the time the context is destroyed
upcoming changes will not allow resetting uncompleted batch states, so
this avoids any sort of conflict as such changes are introduced
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9765>
this will be useful in the future when we need additional work to handle
resets of states that aren't detected as being "completed"
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9765>
Fix defect reported by Coverity Scan.
Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
result_independent_of_operands: start_byte % 2 == 2 is always
false regardless of the values of its operands. This occurs as the
logical operand of if.
Fixes: 3185cb7dbf ("ac: Add NIR passes to lower ES->GS I/O to memory accesses.")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9730>
If we avoid writing anything or decompressing this should be fine,
and allows gamescope to work without nodcc for radeonsi.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8817>
Saves the lock/unlock to get the variants for VS/BS/FS programs, gives us
a place we could hang future linked program state, and gives us safe
constlen handling that fixes a couple of our piglits.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9698>
Changelog:
- Correct typo in generator name which is sfn_nir_algebraic.py
- Rename variables for the gen rules according to meson rules
- Align python command and options according to meson rules
Fixes the following building error:
FAILED: ninja: 'external/mesa/src/gallium/drivers/r600/sfn/r600_nir_algebraic.py',
needed by 'out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_pipe_r600_intermediates/sfn_nir_algebraic.c',
missing and no known rule to make it
Fixes: 195952786b ("r600/sfn: Add algebraic lowering for fsin and fcos")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9766>
It's not just flat-shading that matters in the case of fragment outputs.
Let's play nicely and emit any interpolation mode instead.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9775>
We actually need to set all of these for fragment inputs as well, so
let's make a helper for this that we can reuse.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9775>
I forgot that this was a reachable case pre-tc, but if there's no longer
a record of a batch_id then that just means it completed in the distant
past
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9772>
All other call sites of stw_pixelformat_get_info pass iPixelFormat as-is,
and stw_pixelformat_get_info also subtracts one internally, so I think
this was just an error.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9760>
for e.g., R8G8B8X8 -> R8G8B8A8, we have to force a u_blitter call in order to use
a sampler which ignores alpha, otherwise we end up with broken rendering
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9607>
I didn't ever have a driver to test on which could handle multisampled shader
images while writing this, but need to actually pass the sample id here
Fixes: 9cd2aff1a3 ("zink: add handling for all basic image ops in ntv")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9724>
image operands are ordered by their operand's spirv value, meaning that
the availability operands need to go last here
Fixes: 882ab6afb7 ("zink: add spirv builder functions for image ops")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9724>
these are effectively managed by the fence, so it makes sense to store
them there
the set is ralloc-allocated, so explicitly destroying it isn't needed
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753>
the builtin lowering can't handle dynamic array indexing, so this requires
that all indirect derefs be lowered any time this pass is invoked in order
to avoid crashing
fixes#4132
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9741>
this is a special version of indirect deref lowering which is used by
mesa/st to remove dynamic indexing from builtin uniforms for the lowering
pass in non-packed uniform case
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9741>
vk spec disallows mapping memory regions more than once, but we always
map the full memory range, so we can just refcount and store the pointer
onto the resource object for reuse to avoid issues here
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9725>