translate: reserve more vertex-shader outputs
It's not just position that's special here, we also need space for other special vertex-shader outputs. This fixes a crash with Zink on Lavapipe, because Zink always emits psize to avoid some shader-keys. While this might not be ideal, it's not illegal. So we need to handle it. But it seems we're missing more, and this list is taken from compute_vertex_info() in lp_state_derived.c. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10730>
This commit is contained in:
@@ -45,12 +45,19 @@
|
||||
#include "pipe/p_state.h"
|
||||
|
||||
/**
|
||||
* Translate has to work on one more attribute because
|
||||
* the draw module has to be able to pass the vertex
|
||||
* position even if the fragment shader already consumes
|
||||
* PIPE_MAX_ATTRIBS inputs.
|
||||
* Translate has to work on two more attributes because
|
||||
* the draw module has to be able to pass a few fixed
|
||||
* function vertex shader outputs even if the fragment
|
||||
* shader already consumes PIPE_MAX_ATTRIBS inputs.
|
||||
*
|
||||
* These vertex shader outputs include:
|
||||
* - position
|
||||
* - bcolor (up to two)
|
||||
* - point-size
|
||||
* - viewport index
|
||||
* - layer
|
||||
*/
|
||||
#define TRANSLATE_MAX_ATTRIBS (PIPE_MAX_ATTRIBS + 1)
|
||||
#define TRANSLATE_MAX_ATTRIBS (PIPE_MAX_ATTRIBS + 6)
|
||||
|
||||
enum translate_element_type {
|
||||
TRANSLATE_ELEMENT_NORMAL,
|
||||
|
||||
@@ -85,7 +85,6 @@ spec@arb_sample_shading@samplemask 4 all,Fail
|
||||
spec@arb_seamless_cube_map@arb_seamless_cubemap,Fail
|
||||
spec@arb_shader_storage_buffer_object@array-ssbo-binding,Crash
|
||||
spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgrad,Fail
|
||||
spec@arb_tessellation_shader@arb_tessellation_shader-tes-gs-max-output -small -scan 1 50,Crash
|
||||
spec@arb_texture_buffer_object@render-no-bo,Crash
|
||||
spec@arb_texture_buffer_range@ranges-2 compat,Fail
|
||||
spec@arb_texture_cube_map_array@arb_texture_cube_map_array-sampler-cube-array-shadow,Fail
|
||||
@@ -180,7 +179,6 @@ spec@glsl-1.50@execution@geometry@primitive-id-restart gl_triangles ffs,Fail
|
||||
spec@glsl-1.50@execution@geometry@primitive-id-restart gl_triangles other,Fail
|
||||
spec@glsl-1.50@execution@geometry@primitive-id-restart gl_triangles_adjacency ffs,Fail
|
||||
spec@glsl-1.50@execution@geometry@primitive-id-restart gl_triangles_adjacency other,Fail
|
||||
spec@glsl-1.50@gs-max-output,Crash
|
||||
spec@intel_performance_query@intel_performance_query-issue_2235,Fail
|
||||
spec@khr_texture_compression_astc@array-gl,Fail
|
||||
spec@khr_texture_compression_astc@miptree-gl ldr,Fail
|
||||
|
||||
Reference in New Issue
Block a user