Commit Graph

140687 Commits

Author SHA1 Message Date
Mike Blumenkrantz d773055d92 mesa/st: always inject a 1.0 pointsize for vertex stages
since 1.0 is used in nearly every case, drivers requiring this exporting
can avoid potential shader variants by adding a 1.0 export to the base
shader variant and the only using the ubo upload when pointsize is explicitly
set for wide point functionality

drivers can then be responsible for removing unused pointsize exports
as needed (or desired)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15699>
2022-04-07 21:56:09 -04:00
Mike Blumenkrantz 3aa449ff72 mesa/st: declare added pointsize var as hidden
ensure this isn't counted as part of the shader and ignored for e.g.,
glGetProgramInterfaceiv

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15699>
2022-04-07 21:56:09 -04:00
Mike Blumenkrantz 310903d096 nir/lower_point_size_mov: fix check for overwriting existing pointsize
this should match the comment and allow overwriting injected pointsize
variables regardless of whether xfb is flagged

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15699>
2022-04-07 21:56:09 -04:00
Mike Blumenkrantz 02b573e03e mesa: add a bool indicating when pointsize == 1.0
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15699>
2022-04-07 21:56:09 -04:00
Emma Anholt 75a4e3f0e8 Revert "ci/freedreno: Reduce concurrency when replaying traces on a630"
This reverts commit d948f32365.

I think that fixing the timeout will have resolved this problem.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15805>
2022-04-08 00:24:20 +00:00
Emma Anholt d51aea7f57 freedreno: Fix the cpu-prep wait to be "infinite".
We don't need to restrict our timeout to 5 seconds, because the kernel's
hangcheck will ensure that the wait completes in finite time if the GPU
gets wedged.  If the GPU is making progress, we don't want to time out
early and have pipe_transfer_map() return an error, causing glReadPixels()
to throw a confusing GL_OOM even though we're not out memory.

The INFINITE arg to this function isn't actually infinite, it's limited to
an hour.  But an hour of GPU processing to wait on is probably plenty.

This 5s timeout has caused problems with the CTS on freedreno at high
parallelism, and I suspect is the cause of recent issues in the closed
traces replay jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15805>
2022-04-08 00:24:20 +00:00
Timothy Arceri 7d216f296a glsl: fix needs_lowering() call in varying packing pass
Here we remove the outer arrays on geom and tess shaders where
needed. Without this the pass can sometimes attempt to pack a
varying on only one side of the shader interface where it is not
actually needed. The result can be mismatching varying types.

Fixes: d6b9202873 ("glsl: disable varying packing when its not safe")

Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15761>
2022-04-07 23:57:40 +00:00
Mike Blumenkrantz 3030e5baaf zink: ci updates
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15808>
2022-04-07 23:06:05 +00:00
Mike Blumenkrantz 4bb45bcd16 zink: add error logging for SRGB framebuffer without KHR_swapchain_mutable_format
this is going to explode, so at least print an error explaining why

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15808>
2022-04-07 23:06:05 +00:00
Mike Blumenkrantz bbede22850 lavapipe: KHR_swapchain_mutable_format
it Just Works(tm)

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15808>
2022-04-07 23:06:05 +00:00
Mike Blumenkrantz fde2c1db88 zink: adds refs to user index buffers when tc is not active
there are no ref tricks to abuse in this case, so add our own ref

fixes #6273

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15807>
2022-04-07 22:10:35 +00:00
Mike Blumenkrantz 9187af41b8 zink: allow lod for RECT sampler types
the RECT is a lie, so this is fine

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15804>
2022-04-07 21:37:58 +00:00
Mike Blumenkrantz 6cfcf891c1 nir/lower_tex: avoid adding invalid LOD to RECT textures
this is illegal

Fixes: 74ec2b12be ("nir/lower_tex: Rework invalid implicit LOD lowering")

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15804>
2022-04-07 21:37:58 +00:00
Mike Blumenkrantz dff8813246 zink: set nir_shader_compiler_options::has_txs
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15804>
2022-04-07 21:37:58 +00:00
Jason Ekstrand 4cd260590c nir: Dont set coord_components on txs
Fixes: e1fc23265f ("nir: Add a pass for lowering CL-style image ops to texture ops")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15758>
2022-04-07 21:13:35 +00:00
Mike Blumenkrantz d09ee469f0 kopper: add a dmabuf-free image interface for use with sw drivers
sw drivers don't support modifiers or dmabufs or any of that, so separate
interfaces are needed to avoid advertising extensions that will only lead
to crashes

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15802>
2022-04-07 20:08:10 +00:00
Erik Faye-Lund 31824d4213 dzn: add missing space
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15790>
2022-04-07 19:53:03 +00:00
Erik Faye-Lund 08e4b28a05 dzn: drop unused include
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15790>
2022-04-07 19:53:03 +00:00
Erik Faye-Lund 4ae6c34a5a dzn: drop incorrect return statement
We're returning nothing here. Let's not do that.

Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15790>
2022-04-07 19:53:03 +00:00
Erik Faye-Lund 600d99650b dzn: drop unused header
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15790>
2022-04-07 19:53:03 +00:00
Erik Faye-Lund 76b0023c06 dzn: remove unused variable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15790>
2022-04-07 19:53:03 +00:00
Erik Faye-Lund 96bbcb1e48 dzn: fixup indent
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15790>
2022-04-07 19:53:03 +00:00
Erik Faye-Lund f3ce7d8561 dzn: add D3D12_IGNORE_SDK_LAYERS define
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15790>
2022-04-07 19:53:03 +00:00
Erik Faye-Lund 659e26285a dzn: drop needless includes
These include either dzn_nir.h or dzn_internal.h which already includes
this header.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15790>
2022-04-07 19:53:03 +00:00
Erik Faye-Lund bda5852846 dzn: remove unused struct
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15790>
2022-04-07 19:53:03 +00:00
Erik Faye-Lund f7b0cfe04a dzn: remove needless using
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15790>
2022-04-07 19:53:03 +00:00
Mike Blumenkrantz 1e3b96913c zink: handle swapchain readbacks when a present is pending
if a present semaphore is pending, don't try to create another one

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15784>
2022-04-07 19:22:14 +00:00
Mike Blumenkrantz ed07721d09 zink: only apply swapchain behavior in flush_resource for swapchain images
these could otherwise be pixmaps or dmabufs

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15784>
2022-04-07 19:22:14 +00:00
Mike Blumenkrantz 127d7aeb6c zink: handle deferred swapchain resource flushing
if the swapchain image hasn't been acquired yet, flag it as a deferred
present so it can be picked up on flush

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15784>
2022-04-07 19:22:14 +00:00
Mike Blumenkrantz 3c4be122cc egl: implement more hooks for swrast
these just need to use swapbuffers instead of flush

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15784>
2022-04-07 19:22:14 +00:00
Benjamin Cheng 0666b7fecc anv: drop from_wsi bit from anv_image
It was originally introduced in ca791f5c but it was never actually set
anywhere. It doesn't serve any purpose other than some sanity checking
so let's clean it up for now.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15799>
2022-04-07 18:46:50 +00:00
Ian Romanick b5fa43952a intel/fs: Better handle constant sources of FS_OPCODE_PACK_HALF_2x16_SPLIT
I noticed that a *LOT* of fragment shaders in Shadow of the Tomb Raider,
for instance, end up with a sequence of NIR like:

    vec1 32 ssa_2 = load_const (0x00000000 = 0.000000)
    ...
    vec1 32 ssa_191 = pack_half_2x16_split ssa_188, ssa_2
    vec1 32 ssa_192 = pack_half_2x16_split ssa_189, ssa_2
    vec1 32 ssa_193 = pack_half_2x16_split ssa_190, ssa_2

This results in an assembly sequence like:

    mov(8)          g28<1>UD        0x00000000UD
    mov(8)          g21<2>HF        g28<8,8,1>F
    shl(8)          g21<1>UD        g21<8,8,1>UD    0x00000010UD
    mov(8)          g21<2>HF        g25<8,8,1>F
    mov(8)          g19<2>HF        g28<8,8,1>F
    shl(8)          g19<1>UD        g19<8,8,1>UD    0x00000010UD
    mov(8)          g19<2>HF        g23<8,8,1>F
    mov(8)          g20<2>HF        g28<8,8,1>F
    shl(8)          g20<1>UD        g20<8,8,1>UD    0x00000010UD
    mov(8)          g20<2>HF        g24<8,8,1>F

After this commit, the generated assembly is:

    mov(8)          g21<1>UD        0x00000000UD
    mov(8)          g21<2>HF        g23<8,8,1>F
    mov(8)          g19<1>UD        0x00000000UD
    mov(8)          g19<2>HF        g17<8,8,1>F
    mov(8)          g20<1>UD        0x00000000UD
    mov(8)          g20<2>HF        g18<8,8,1>F

Tiger Lake, Ice Lake, Skylake, and Haswell had similar results. (Ice Lake shown)
total instructions in shared programs: 20119086 -> 20119034 (<.01%)
instructions in affected programs: 9056 -> 9004 (-0.57%)
helped: 8
HURT: 0
helped stats (abs) min: 2 max: 16 x̄: 6.50 x̃: 4
helped stats (rel) min: 0.29% max: 1.75% x̄: 1.00% x̃: 0.98%
95% mean confidence interval for instructions value: -11.01 -1.99
95% mean confidence interval for instructions %-change: -1.56% -0.44%
Instructions are helped.

total cycles in shared programs: 861019414 -> 861021044 (<.01%)
cycles in affected programs: 279862 -> 281492 (0.58%)
helped: 4
HURT: 2
helped stats (abs) min: 6 max: 936 x̄: 239.00 x̃: 7
helped stats (rel) min: 0.03% max: 8.13% x̄: 2.09% x̃: 0.09%
HURT stats (abs)   min: 18 max: 2568 x̄: 1293.00 x̃: 1293
HURT stats (rel)   min: 0.36% max: 1.14% x̄: 0.75% x̃: 0.75%
95% mean confidence interval for cycles value: -972.56 1515.89
95% mean confidence interval for cycles %-change: -4.77% 2.49%
Inconclusive result (value mean confidence interval includes 0).

Broadwell
total instructions in shared programs: 17812327 -> 17812263 (<.01%)
instructions in affected programs: 9867 -> 9803 (-0.65%)
helped: 8
HURT: 0
helped stats (abs) min: 2 max: 28 x̄: 8.00 x̃: 4
helped stats (rel) min: 0.32% max: 1.80% x̄: 1.00% x̃: 0.95%
95% mean confidence interval for instructions value: -15.46 -0.54
95% mean confidence interval for instructions %-change: -1.54% -0.47%
Instructions are helped.

total cycles in shared programs: 904768620 -> 904773291 (<.01%)
cycles in affected programs: 454799 -> 459470 (1.03%)
helped: 4
HURT: 4
helped stats (abs) min: 36 max: 586 x̄: 344.50 x̃: 378
helped stats (rel) min: 0.47% max: 4.04% x̄: 2.01% x̃: 1.77%
HURT stats (abs)   min: 1 max: 5572 x̄: 1512.25 x̃: 238
HURT stats (rel)   min: <.01% max: 2.77% x̄: 1.46% x̃: 1.53%
95% mean confidence interval for cycles value: -1122.40 2290.15
95% mean confidence interval for cycles %-change: -2.26% 1.71%
Inconclusive result (value mean confidence interval includes 0).

total spills in shared programs: 18581 -> 18579 (-0.01%)
spills in affected programs: 323 -> 321 (-0.62%)
helped: 1
HURT: 0

total fills in shared programs: 24985 -> 24981 (-0.02%)
fills in affected programs: 1348 -> 1344 (-0.30%)
helped: 1
HURT: 0

Tiger Lake, Ice Lake, and Skylake had similar results. (Ice Lake shown)
Instructions in all programs: 143585431 -> 143513657 (-0.0%)
Instructions helped: 14403

Cycles in all programs: 8439312778 -> 8439371578 (+0.0%)
Cycles helped: 10570
Cycles hurt: 3290

Gained: 146
Lost: 74

All of the lost and gained fossil-db shaders are SIMD32 fragment
shaders.  14,247 of the affected shaders are from Shadow of the Tomb
Raider.  154 are from Batman Arkham Origins, and the remaining two are
from Octopath Traveler.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15089>
2022-04-07 18:26:23 +00:00
Alyssa Rosenzweig 1fb4427a7a pan/bi: Imply round mode most of the time
Much less noisy, and provides a path to further improvements. There is a slight
behaviour change: int-to-float conversions now use RTE instead of RTZ. For
32-bit opcodes, this affects conversions of integers with magnitude greater than
2^23 by at most 1 ulp. As this behaviour is unspecified in GLSL, this change is
believed to be acceptable.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15187>
2022-04-07 18:03:57 +00:00
Alyssa Rosenzweig a747708b9d pan/bi: Use should_skip in bi_builder generation
To avoid further code duplication.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15187>
2022-04-07 18:03:57 +00:00
Alyssa Rosenzweig de37f75554 pan/bi: Mark some opcodes as default round-to-zero
Conversions to integer have different rounding rules.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15187>
2022-04-07 18:03:57 +00:00
Alyssa Rosenzweig 24d072fd6a pan/bi: Don't use funny round modes in tests
To prepare for defeaturing round modes, replace uses of round-to-positive with
round-to-even in our unit tests. This doesn't meaningfully impact test coverage;
there is no way to generate that round mode.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15187>
2022-04-07 18:03:57 +00:00
Alyssa Rosenzweig b5026c3d7c panfrost: Use track_image_access on Bifrost
Equivalent logic, as previously extracted.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig 8689a88d10 panfrost: Add helpers to emit Valhall data structures
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig 0d48a57452 panfrost: Adapt viewport/scissor to Valhall
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig e4edb1a53f panfrost: Hide some Bifrost-specific functions
Pertains to data structures removed in Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig 58934dd666 panfrost: Add valhall_has_blend_shader field
Required in a hot path for silly historical reasons, so add a field to save a
pre-computed value thereof.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig fed04de481 panfrost: Add Valhall fields to panfrost_batch
There are new data structures that we need to (dirty) track. Add the
corresponding fields so we can proceed as with Bifrost dirty tracking.

Trivial increase in memory usage, but that should not matter as batches are
few.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig 270e3e02f2 panfrost: Split out allow_fpk helper
For sharing between Bifrost's renderer state descriptor and Valhall's draw call
descriptor, which require the same logic in different places.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig ba395fc94c panfrost: Split out panfrost_get_blend_shaders
The same logic is useful on Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig c408f7551c panfrost: Specialize vertex state for Valhall
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:37 +00:00
Alyssa Rosenzweig 0795f3d7e4 panfrost: Add a pool to sampler_view
So we can allocate temporary sampler views for writeable images on Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:37 +00:00
Alyssa Rosenzweig 0299565f72 panfrost: Adapt panfrost_rasterizer for v9
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:37 +00:00
Alyssa Rosenzweig 9a521433ae panfrost: Don't set a default for blend count
Unnecessary.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:37 +00:00
Alyssa Rosenzweig 7d1d7cdf57 panfrost: Don't check alpha test in fs_required on Bifrost+
Alpha testing is only native on Midgard. Saves a few instructions.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
2022-04-07 17:43:37 +00:00
Ian Romanick c08302670b intel/compiler: Fix sample_d messages on DG2
DG2 can only do sample_d and sample_d_c on 1D and 2D surfaces.  The
maximum number of gradient components and coordinate components should
be 2.  In spite of this limitation, the Bspec lists a mysterious R
component before the min_lod, so the maximum coordinate components is 3.

Fixes the following Vulkan CTS failures on DG2:

    dEQP-VK.glsl.texture_functions.texturegradclamp.isampler1d_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.isampler2d_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.sampler1d_fixed_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.sampler1d_float_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.sampler2d_fixed_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.sampler2d_float_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.usampler1d_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.usampler2d_fragment

The Fixes: tag below is a bit misleading. This commit fixes some test
cases similar to ones fixed by the Fixes: commit.  I just want to make
sure this commit gets applied everywhere that commit was also applied.

Fixes: 635ed58e52 ("intel/compiler: Lower txd for 3D samplers on XeHP.")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15781>
2022-04-07 17:09:28 +00:00