Commit graph

159247 commits

Author SHA1 Message Date
Qiang Yu
12ee7eccf7 aco,radv: remove unused aco_shader_info fields
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23094>
2023-06-02 09:21:58 +00:00
Qiang Yu
89dab66561 aco: implement two load lds ngg intrininsic for radeonsi
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23094>
2023-06-02 09:21:58 +00:00
Emma Anholt
2d02494d71 ci/turnip: Update full-run xfails.
The big pile of crashes were all either not covered by the fractional run
and a full run hadn't been run to update them, or unsupported where
Crash->Skip is not being reported as UnexpectedPass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23385>
2023-06-02 04:33:40 +00:00
Emma Anholt
200b55496a ci/crocus: Add a missing xfail.
Probably more fallout from debian 12 uprev.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23379>
2023-06-02 02:29:21 +00:00
Emma Anholt
7609b9f036 crocus: Fix regression from !20153
The MR fixed iris in 14dec0c147, but didn't
do the same fix for crocus.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23379>
2023-06-02 02:29:21 +00:00
Emma Anholt
a6435e15eb ci/freedreno: Update minetest hash.
1 different pixel, undetectable change.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
d8caa80cc5 mesa: Use shared NIR code for ARB_vp and FF VS position transformation.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
6855edcfb8 mesa/ffvs: Fix mvp_with_dp4 position transformation.
Copy and paste mistake, but didn't affect anybody since this knob is
disconnected at the moment.

Fixes: c5b3d488f9 ("mesa/main: make ffvertex output nir")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
6b529eabeb mesa: Use the NIR pass for fixed function fog.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
804647acfc mesa/ati_fs: Move prog->SamplersUsed/TexturesUsed setup to EndFragmentShader.
No need to have st_program.c come back into ATI_fs for this when it's a
property of program generation.  ARB programs set these up in their
translation, as well.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
6fde02816d mesa/ati_fs: Move NIR translation to ATI_fs compile time.
Now ati_fs takes the same basic path as prog_to_nir, and we don't have to
think about it so much.  Also, the ATI_fs frontend can skip shader info
setup since nir_shader_gather_info does it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
a652185696 mesa/ati_fs: Move sampler dim adjustment to a separate NIR pass.
This means that the main NIR translation for ATI_fs is now independent of
the fp key, and we could do it earlier in the compile pipeline.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
00f03a409c mesa: Move st_prog_to_nir_postprocess out of prog_to_nir.
We called it in the else branch, anyway.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
12c8499f31 mesa: Drop remaining unused ARB program instructions.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
7549f4f004 mesa: Drop unused control flow instructions for ARB programs.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
f0a8899ed1 mesa: Drop ARB program helper functions that are no longer used.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
279403d174 mesa: Move ARB_vp position invariant option handling to NIR.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
9301c08343 mesa/ARB_fp: Use the NIR pass for adding fog code instead of ARB instrs.
Tested with
https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/813

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
07c93cbdb0 mesa/ARB_fp: Drop an extra enum for fog mode.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
66951679f2 mesa: Move ATI_fragment_shader fog code emit to a NIR lowering pass.
Now it's implemented as a RMW of the FRAG_RESULT_COLOR output var (or
adjusting the store_output intrinsic's value for lowered i/o), which
should be reusable other places we might want to emit shader code for fog
(ARB_fp, fixed function fragment shaders).

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
b26a9efc5a nir,mesa: Add helpers for creating uniform state variables.
It's one of the weirder parts of our shader interface's interactions with
the GL API, so let's try to make it a little cleaner.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
95c3445258 nir: Use find_state_var in lower_atomics_to_ssbo.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Emma Anholt
1746413dd7 mesa: Use find_state_var in lower_builtin.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23111>
2023-06-01 23:57:32 +00:00
Jesse Natalie
5a914dcd6a d3d12: Support PIPE_CAP_VS_LAYER_VIEWPORT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23377>
2023-06-01 23:39:41 +00:00
Jesse Natalie
f622b3072d microsoft/compiler: Viewport/layer as input to GS/HS needs to set feature bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23377>
2023-06-01 23:39:41 +00:00
Jesse Natalie
764e39be36 microsoft/compiler: Fix usage of type var in semantic asserts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23377>
2023-06-01 23:39:41 +00:00
Jesse Natalie
d100ddd8d7 microsoft/compiler: Fix the int->uint pass for arrayed I/O
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23377>
2023-06-01 23:39:41 +00:00
Jesse Natalie
0596304d62 dzn: Don't lower away mediump
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23344>
2023-06-01 23:01:04 +00:00
Jesse Natalie
3b0cc6e204 spirv2dxil: Enable mediump
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23344>
2023-06-01 23:01:04 +00:00
Jesse Natalie
ea68135ed1 microsoft/compiler: Handle mediump
Instead of treating all 16-bit values as "native 16-bit types,"
differentiate between concrete casts and mediump casts, where the
former requires native 16-bit types, and the latter only requires
DXIL min-precision. Additionally, UBO/SSBO loads/stores require
native 16-bit types.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23344>
2023-06-01 23:01:04 +00:00
Jesse Natalie
7371c9a2a8 microsoft/compiler: Always set support_16bit_alu
This just affects some nir opts. If we're lowering 16bit ops anyway,
the optimization doesn't matter.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23344>
2023-06-01 23:01:04 +00:00
Jesse Natalie
2d3fbb44f4 nir: Add preserve_mediump as a shader compiler option
The DXIL backend would like to distinguish between casts to 16-bit
that must cast, vs those that may. If a shader only ever produces
16-bit types from mediump casts and ALU ops on those values, then
the resulting shader can be annotated with DXIL's min-precision
qualifier, basically telling the driver to use 16-bit precision if
it's faster for them. If it uses concrete 16-bit casts, or loads/
stores to externally-visible memory, then it must use the "native"
16-bit flag, which is not supported on all hardware.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23344>
2023-06-01 23:01:04 +00:00
Emma Anholt
cb965b207e zink: Use PIPE_CAP_FS_POINT_IS_SYSVAL.
This better matches up to how spirv treats the value.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22950>
2023-06-01 22:27:08 +00:00
Emma Anholt
bc773b795c nir/lower_texcoord_replace: Flag SYSTEM_VALUE_POINT_COORD read when we load it.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22950>
2023-06-01 22:27:08 +00:00
Emma Anholt
0e943bc3f2 glsl: Allow invariant flags on sysvals, such as gl_PointCoord.
When you set PIPE_CAP_FS_POINT_IS_SYSVAL, we'd fall out of
is_allowed_invariant(), despite it being allowed on special builtins.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22950>
2023-06-01 22:27:08 +00:00
Dave Airlie
c58518226b gallium/nir/tgsi: add various support for task/mesh bits
these translators are used by llvmpipe so need to be updated

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:57 +00:00
Dave Airlie
8fd1aad8f8 gallium/cso: add task/mesh shaders to the cso cache
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:57 +00:00
Dave Airlie
b02fba337f d3d12: don't report mesh/task limits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:57 +00:00
Dave Airlie
ece1cb8c6b svga: don't report mesh/task shader limits
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:57 +00:00
Dave Airlie
31db515e03 radeonsi: don't report shader params for task/mesh
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:56 +00:00
Dave Airlie
fd1ff352dd crocus: don't report mesh/task limits
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:56 +00:00
Dave Airlie
7b547ccb9a iris: don't return shader params for task/mesh.
These should be reported as 0 for cso

Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:56 +00:00
Dave Airlie
2b3514966d gallium: add task/mesh shader entrypoints in context
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:56 +00:00
Dave Airlie
2e8991733a freedreno: don't report task/mesh.
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:56 +00:00
Dave Airlie
564094b3ce gallium: add a new PIPE_SHADER_MESH_TYPES
This adds a new limit, changing PIPE_SHADER_TYPES seems frought
with danger and very tricky. Currently only lava/llvmpipe plan to
offer task/mesh in GL land, so let's limit the fallout for now.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:56 +00:00
Dave Airlie
96b38883df gallium: expand pipe_grid_info to handle task/mesh.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:56 +00:00
Dave Airlie
0602108c38 gallium: add task/mesh shader query types to stats interface.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
2023-06-01 21:50:56 +00:00
Karol Herbst
97c48edac0 rusticl/device: limit MAX_PARAMETER_SIZE to 32k
There is no good reason of having it too big and radeonsi returns an
absurd high value through PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE.

This speeds up the CTS testing this device limit.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23378>
2023-06-01 21:35:00 +00:00
Kenneth Graunke
2d9a3bb093 intel/compiler: Fix a fallthrough in components_read() for atomics
In commit 284f0c9a57 I refactored the
handling of the data source to just call a helper rather than special
casing opcodes with 0 or 2 sources.  Unfortunately, I also dropped the
"else return 1", creating a fallthrough for all sources other than
SURFACE_LOGICAL_SRC_ADDRESS and SURFACE_LOGICAL_SRC_DATA.

The case below happened to return the correct value for all cases except
SURFACE_LOGICAL_SRC_SURFACE, which has been returning 2 instead of 1
since that commit.

Restore the else case.  Thanks to Marcin Ślusarz for catching this.

Fixes: 284f0c9a57 ("intel/compiler: Add an lsc_op_num_data_values() helper")
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/23347>
2023-06-01 21:06:57 +00:00
Rob Clark
c5bac3164a freedreno/a6xx: Enable gl46
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23301>
2023-06-01 20:37:59 +00:00