It's sometimes really, really useful if GL_BGRA8 can be used as a
sized internal format, and the combination of EXT_texture_storage
and EXT_texture_format_BGRA8888 allows this (only when using
texture-storage, which is good enough in some cases). Until now,
we've only implemented ARB_texture_storage, and not the EXT
version.
So let's implement the EXT version as well, so we get the benefit
of the interaction here. This pulls in a lot of other similar
interactions as well, which also seems useful.
...because the ARB version is created from the EXT version, let's move
the EXT function definitions to the EXT extension. These should probably
have been suffixed with ARB in the ARB-version, but things seems to have
just ended up kinda confused. Oh well.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27222>
We already had the logic implemented, but it was never really tested
(there was a comment about that)
So the advantage of this is that we now test that code (in fact, there
were a small typo on that code).
There aren't too much CTS tests for this feature, but we gets tests
like this working:
dEQP-VK.clipping.clip_volume.depth_clip.*
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10527
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27386>
Demoting means that we don't execute any writes to memory but
otherwise the invocation continues to execute. Particularly,
subgroup operations and derivatives must work.
Our implementation of discard does exactly this by using
setmsf to prevent writes for the affected invocations, the
only difference for us is that with discard/terminate we
want to be more careful with emitting quad loads for tmu
operations, since the invocations are not supposed to be
running any more and load offsets may not be valid, but with
demote the invocations are not terminated and thus we should
emit memory reads for them to ensure quad operations and
derivatives from invocations that have not been demoted still
work.
Since we use the sample mask to implement demotes we can't tell
whether a particular helper invocation was originally such
(gl_HelperInvocation in GLSL) or was later demoted
(OpIsHelperInvocationEXT added with SPV_EXT_demote_to_helper_invocation),
so we use nir_lower_is_helper_invocation to take care of this.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26949>
This is a promotion from the EXT, except the new property
supportsNonZeroFirstInstance which should already be supported.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26595>
A write mask based on the pipeline creation input is stored in scratch. Another
similar mask is also stored for the dynamic color_write_enable. These can then
be updated individually, and will be combined in MME macro before use.
Each attachment has a mask for rgba. The max number of attachments in 8 so
we can fit the write mask in a single 32bit scratch.
color_write_enable is a single bit per attachment. To make it easier to combine
in with the write mask it is stored in scratch with a separate rgba bits.
The layout of the both scratch values are:
Attachment index 88887777666655554444333322221111
Component abgrabgrabgrabgrabgrabgrabgrabgr
dEQP-VK.pipeline.monolithic.color_write_enable.*
Test run totals:
Passed: 576/576 (100.0%)
Failed: 0/576 (0.0%)
Not supported: 0/576 (0.0%)
Warnings: 0/576 (0.0%)
Waived: 0/576 (0.0%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26211>