Ian Romanick
8d90b13954
nir/algebraic: Catch some kinds of copy-and-paste bugs in algebraic patterns
...
A later commit adds a pattern
(('umin', ('iand', a, '#b(is_pos_power_of_two)'),
('iand', c, '#b(is_pos_power_of_two)')),
('iand', ('iand', a, b), ('iand', c, b))),
When I originally made that pattern, I copied and pasted the search to
the replacement as
(('umin', ('iand', a, '#b(is_pos_power_of_two)'),
('iand', c, '#b(is_pos_power_of_two)')),
('iand', ('iand', a, '#b(is_pos_power_of_two)'),
('iand', c, '#b(is_pos_power_of_two)'))),
The caused the variables in the replacement to be marked is_constant,
and that resulted in an assertion failure deep inside nir_search.
src/compiler/nir/nir_search.c:530: construct_value: Assertion `!var->is_constant' failed.
These extra validation rules catch this kind of error at compile time
rather than at run time.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Tested-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15121 >
2022-12-14 06:23:20 +00:00
Yonggang Luo
fa02fb5cca
gallium/pp: typedef and use pp_st_invalidate_state_func to avoid cast
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20042 >
2022-12-14 05:47:52 +00:00
Yonggang Luo
a23488d63e
gallium/hud: typedef and use hud_st_invalidate_state_func to avoid cast
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20042 >
2022-12-14 05:47:52 +00:00
Nanley Chery
e4e4ba2304
intel: Allow CCS_E on R11G11B10_FLOAT for TGL+
...
We now support blorp_copy with this format.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19937 >
2022-12-14 03:05:24 +00:00
Nanley Chery
e862626031
intel/isl: Bump format_info entries from 100 to 110
...
The new format support is only tested on Ice Lake and onward. Makes the
next patch clearer.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19937 >
2022-12-14 03:05:24 +00:00
Nanley Chery
2b2141d193
intel/isl: Lessen CCS_E-compatibility checks for TGL+
...
Tiger Lake and onward allow drivers to specify a compression format
independently from the surface format. So, even if the surface format
changes, hardware is still able to determine how to access the CCS.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19937 >
2022-12-14 03:05:24 +00:00
Nanley Chery
2add57d0c2
intel: Hook up RENDER_SURFACE_STATE::DecompressInL3
...
The sampler's decompressor seems to lack support for some types of
format re-interpretation. Use the more capable decompressor for these
cases. This will be needed to avoid regressing piglit's
arb_texture_view-rendering-formats in later commits.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19937 >
2022-12-14 03:05:24 +00:00
Eric Engestrom
408f1c689c
v3dv: skip some invalid tests
...
Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20305 >
2022-12-14 01:59:00 +00:00
Iago López Galeiras
5f2171625b
asahi: unbind samplers and fix sampler_count if state is NULL
...
When states is NULL, unbind samplers (to avoid dangling pointers) and
set sampler_count to the highest non-null samplers[] entry instead of
setting it to 0.
This is ported from a similar fix in panfrost:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20285
Signed-off-by: Iago López Galeiras <iaguis@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20306 >
2022-12-14 00:13:44 +00:00
Konstantin Seurer
687a82d2d3
radv/rt: Handle no-null shader flags
...
If those flags are set, we can assume that idx is not 0.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20286 >
2022-12-13 23:30:28 +00:00
Marek Olšák
a3aea98a2a
nir: validate that store_buffer_amd doesn't use a non-trivial writemask
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422 >
2022-12-13 20:33:05 +00:00
Marek Olšák
afcbccb078
ac/llvm: implement ACCESS_USE_FORMAT_AMD as buffer_load/store_format
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422 >
2022-12-13 20:33:05 +00:00
Marek Olšák
5307480f4e
ac/llvm: unify load_buffer_amd and store_buffer_amd code
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422 >
2022-12-13 20:33:05 +00:00
Marek Olšák
150c2cec63
nir: add ACCESS_USES_FORMAT_AMD for typed buffer opcodes
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422 >
2022-12-13 20:33:05 +00:00
Marek Olšák
716ac4a55d
nir: replace IS_SWIZZLED flag with ACCESS_IS_SWIZZLED_AMD
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422 >
2022-12-13 20:33:05 +00:00
Marek Olšák
7998c3bdd3
nir: remove redundant SLC_AMD in favor of ACCESS_STREAM_CACHE_POLICY
...
ACCESS_STREAM_CACHE_POLICY was added to map to SLC for AMD.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422 >
2022-12-13 20:33:05 +00:00
Marek Olšák
c0d69b40bc
nir: add nir_texop_sampler_descriptor_amd
...
We'll use it to query the min/mag filter in the shader.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422 >
2022-12-13 20:33:05 +00:00
Lionel Landwerlin
e2dc32d755
anv: move functions around to plan for generated draws
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Lionel Landwerlin
971e07361a
genxml: add gen12/12.5 CS prefetch disable bits
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Lionel Landwerlin
4a3faab512
anv: move draw command helpers to their own file
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Lionel Landwerlin
624ac55721
anv: move total_batch_size to anv_batch
...
We'll want 2 batches :
* the main one
* another to contain dispatch commands to generate stuff in the
main batch
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Lionel Landwerlin
8d21e29be3
anv: add helper to get current address of a batch
...
And allow the function to get the very first address in the batch.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Lionel Landwerlin
c9272e80b1
anv: add a utility function to ensure command buffer space
...
Ensuring the space is contiguous.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Lionel Landwerlin
21e32e1f8d
anv: document utrace field
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Jason Ekstrand
c70ef757e6
anv: Use extended parameters on Gen11+
...
Gen11 added a nifty feature where we have three custom system-generated
values called extended parameters that we can set to any 32-bit values
we want. These work just like vertex and instance ID and are controlled
in the pipeline by the 3DSTATE_SGVS_2 packet. They are provided to the
draw call either by extra DWORDs on the end of 3DSTATE_PRIMITIVE or by
storing values to more state registers.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Jason Ekstrand
2680e32f71
intel/blorp: Emit a dummy 3DSTATE_VF_SGVS_2
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Jason Ekstrand
9859413bf4
intel/genxml: Add 3DPRIMITIVE_EXTENDED opcodes on Gen11+
...
On Gen11 and above, the 3DPRIMITIVE command takes an optional additional
three DWORDs of data as "extended parameters". These extended
parameters only exist in the packet if "Extended Parameters Present" is
set. Because our packing code doesn't handle variable-length commands
well, this commit adds a second version of the command which isn't real
but is just a copy of 3DPRIMITIVE with the additional dwords where the
"Extended Parameters Present" defaults to true and "DWord Length" is
adjusted by 3 as needed. The 3DPRIMITIVE command is then the gen4-9
version which still works fine but doesn't have the new parameters.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Jason Ekstrand
781a16382d
intel/genxml: Make some fields Booleans
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Lionel Landwerlin
75d20a18f5
anv/utrace: only record the emitted pipecontrol flags
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Lionel Landwerlin
5fd0d27280
intel/ds: trace a couple of more pipe control flags
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295 >
2022-12-13 19:22:02 +00:00
Marek Olšák
eea416d0c9
cso: fix a regression from draw_vbo rework
...
Fixes: c9b13a9338 - cso: remove cso_draw_vbo from all draws, call the driver or u_vbuf directly
Reviewed-by: Brian Paul <brianp@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20288 >
2022-12-13 18:41:26 +00:00
Aleksey Komarov
d51fc12af9
panfrost: fix sampler_count and unbind samplers in bind_sampler_states
...
1. Old approach did not support unbind (set to NULL) samplers because
it only copied memory if sampler is not empty. New approach checks
if sampler is empty - it will set NULL.
2. Old approach just set sampler_count to 0 if sampler is empty.
That's wrong and we need to find highest non-null samplers[] entry.
It was done in new approach.
3. Gallium dosc says:
```
NOTE: at this time, start is always zero ...
This may change in the future.
```
It's better to take into consideration start parameter in new approach.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20285 >
2022-12-13 18:28:21 +00:00
Lionel Landwerlin
a921486e2a
anv: disable Wa_1806565034 when robustImageAccess is enabled
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5711
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7859
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20280 >
2022-12-13 18:05:19 +00:00
Lionel Landwerlin
94bb4a13fa
intel/fs: make Wa_1806565034 conditional to non robust access
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20280 >
2022-12-13 18:05:19 +00:00
Lionel Landwerlin
89a550a37b
isl: make Wa_1806565034 conditional to non robust access
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20280 >
2022-12-13 18:05:19 +00:00
Sathishkumar S
6a3179c5a9
frontends/va: fix crash during grayscale rendering
...
crash is observed as format is assumed to be yuv and buffer plane
order is undefined for monochrome. luma only format is not to be
considered yuv format. It has to be rendered with rgb=rrr.
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Reviewed-by: Thong Thai <thong.thai@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20165 >
2022-12-13 15:37:18 +00:00
Sathishkumar S
7ad4a5079e
radeonsi/vcn: fix regression in yuv422 jpeg decode
...
- yuv422 decode was blocked in 12acee17fa , enable it back.
- nv12 yuv422 and grayscale decode is supported on all versions.
- JPEG2 and higher versions supports 444p decode.
- add l8_unorm to supported formats, can be used for grayscale.
Fixes: 12acee17fa (frontends/va: reallocate surface for yuv400/yuv444 picture)
v2: indent the switch case correctly (Thong Thai)
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Reviewed-by: Thong Thai <thong.thai@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20165 >
2022-12-13 15:37:18 +00:00
Samuel Pitoiset
b4f940913d
radv: do not remove the PointSize built-in for polygon mode as points
...
Determine if it can be removed when generating the graphics pipeline
key because of dynamic states.
Fixes new CTS dEQP-VK.rasterization.polygon_as_large_points.* and also
spec@!opengl 1.1@polygon-offset with Zink/RADV.
Cc: 22.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20073 >
2022-12-13 15:01:31 +00:00
Marcin Ślusarz
75375233f6
intel/compiler/mesh: extract emit_urb_direct_vec4_write
...
No functional changes.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292 >
2022-12-13 13:00:49 +00:00
Marcin Ślusarz
3a60112ce5
intel/compiler: optimize away local_inv_index and local_inv_id if workgroup size is 1
...
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292 >
2022-12-13 13:00:49 +00:00
Marcin Ślusarz
85b1c89e20
intel/compiler: split lower_cs_intrinsics_convert_block
...
No functional changes.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292 >
2022-12-13 13:00:48 +00:00
Marcin Ślusarz
bb93f1bda1
intel/compiler/mesh: extract shared code for offset adjustment
...
No functional changes.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292 >
2022-12-13 13:00:48 +00:00
Marcin Ślusarz
5ffdd47a26
anv: simplify EXT_mesh_shader lowering
...
No functional changes.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292 >
2022-12-13 13:00:48 +00:00
Marcin Ślusarz
7fbd1dfb18
anv,intel/compiler/mesh: drop lowering of gl_Primitive*IndicesEXT
...
Until U888X index format lands this change shouldn't have any impact on performance.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292 >
2022-12-13 13:00:48 +00:00
车扬
f6929e7c3b
intel: fix the wrong function name
...
pipe not create_vertex_elements fuction
Signed-off-by: cheyang <cheyang@bytedance.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20291 >
2022-12-13 11:43:17 +00:00
Lionel Landwerlin
a0991c7c79
anv: fixup descriptor copies
...
I did not properly understood that we cannot access the views written
to the descriptor sets because they might have been destroyed after
the write operation and the copy operation is allowed to copy what is
invalid data. The shader just can't access it.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 03e1e19246 ("anv: Refactor descriptor copy")
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20222 >
2022-12-13 09:13:05 +00:00
Gert Wollny
79cb465526
r600: Lower all bitfield ops on pre-EG
...
Fixes: 4dff3ff005
nir/opt_algebraic: Optimize open coded bfm.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20283 >
2022-12-13 09:04:53 +00:00
Gert Wollny
357e5fac99
r600/sfn: Use variable length DOT on Evergreen and Cayman
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20283 >
2022-12-13 09:04:53 +00:00
Gert Wollny
573448f93c
r600/sfn: prepare alu split for use of variable length dot
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20283 >
2022-12-13 09:04:53 +00:00
Gert Wollny
edabd5cd84
r600/sfn: check used channels when evaluating allowed mask
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7878
v2: Fix ws in comment (iorn10)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20283 >
2022-12-13 09:04:53 +00:00