mesa/src/gallium/drivers/r300
Pavel Ondračka 42a3d22f16 r300: Keep rc_rename_regs() from overflowing RC_REGISTER_MAX_INDEX
This pass tries to move register usage closer to SSA, and for large
shaders this means we can overflow the register index, which only has
RC_REGISTER_INDEX_BITS size. This creates invalid code and leads to
crash at a later stage. Limit the pool of available registers to
RC_REGISTER_MAX_INDEX, currently is was two times the number of
shader instructions.

This means we'll fail the compile right away if we wanted more than
RC_REGISTER_MAX_INDEX temps, but when we've got that many we're
already well past how many instructions we can support anyway.

CC: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6017
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17393>
2022-07-11 03:38:59 +00:00
..
ci r300: don't check for unitialized reads when rewriting register 2022-06-05 21:38:36 +00:00
compiler r300: Keep rc_rename_regs() from overflowing RC_REGISTER_MAX_INDEX 2022-07-11 03:38:59 +00:00
.editorconfig
meson.build nir: Add missing dependency on nir_opcodes.py 2022-02-17 22:57:33 +00:00
r300_blit.c r300,r600,svga: save the FS constant buffer for u_blitter to fix a regression 2022-05-27 00:01:41 +00:00
r300_cb.h
r300_chipset.c gallium: move radeon_winsys.h into gallium/include/winsys/ 2022-04-17 01:27:34 +00:00
r300_chipset.h
r300_context.c winsys/amdgpu-radeon: Allow specifying context priority 2022-05-25 14:15:30 +00:00
r300_context.h util: Rename pipe_debug_callback to util_debug_callback 2022-04-01 01:52:43 +00:00
r300_cs.h
r300_debug.c r300: Replace RADEON_NO_TCL with RADEON_DEBUG=notcl 2021-12-29 18:11:59 +00:00
r300_defines.h
r300_emit.c r300: set PVS_XYZW_VALID_INST properly to last position write 2022-04-01 21:18:42 +00:00
r300_emit.h
r300_flush.c r300: remove unused simple_list.h 2022-04-22 09:39:41 -07:00
r300_fs.c r300: respect output_semantic_index when writing colors 2022-03-28 17:46:32 +00:00
r300_fs.h r300: Precompile the FS at shader creation time. 2021-12-08 02:35:52 +00:00
r300_hyperz.c
r300_public.h
r300_query.c r300: remove unused simple_list.h 2022-04-22 09:39:41 -07:00
r300_reg.h r300: Remove unused RC_OPCODE_XPD. 2021-12-16 16:57:02 +00:00
r300_render.c r300: skip draws instead of using a dummy vertex shader 2022-05-09 23:02:57 +00:00
r300_render_stencilref.c
r300_render_translate.c
r300_resource.c
r300_screen.c r300: expose PIPE_CAP_LEGACY_MATH_RULES 2022-06-14 06:07:11 +00:00
r300_screen.h gallium: move radeon_winsys.h into gallium/include/winsys/ 2022-04-17 01:27:34 +00:00
r300_screen_buffer.c
r300_screen_buffer.h
r300_shader_semantics.h
r300_state.c r300: move pointer dereference after a NULL check 2022-04-11 20:48:11 +00:00
r300_state_derived.c r300: skip draws instead of using a dummy vertex shader 2022-05-09 23:02:57 +00:00
r300_state_inlines.h
r300_texture.c replace 0 with NULL for NULL pointers 2022-01-10 22:53:32 +00:00
r300_texture.h
r300_texture_desc.c
r300_texture_desc.h
r300_tgsi_to_rc.c r300: fix UB caused by 1 << 31 and 2 << 30 2021-10-05 19:07:27 +00:00
r300_tgsi_to_rc.h
r300_transfer.c
r300_transfer.h
r300_vs.c r300: skip draws instead of using a dummy vertex shader 2022-05-09 23:02:57 +00:00
r300_vs.h r300: restructure r300_vertex_shader 2022-03-29 21:37:24 +00:00
r300_vs_draw.c tgsi/transform: Make tgsi_transform_shader() manage token allocation. 2022-04-08 21:31:44 +00:00