glsl: fix gl_CullDistance lowering from float[8] to vec4[2]
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7152
Fixes: ad355652c2
("glsl: Extend lowering pass for gl_ClipDistance to support other arrays")
Signed-off-by: Oleksii Bozhenko oleksii.bozhenko@globallogic.com
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21810>
This commit is contained in:

committed by
Marge Bot

parent
ec31535ce0
commit
bf910c94e0
@@ -686,10 +686,8 @@ xfb_decl_find_candidate(struct xfb_decl *xfb_decl,
|
||||
name = xfb_decl->var_name;
|
||||
break;
|
||||
case clip_distance:
|
||||
name = "gl_ClipDistanceMESA";
|
||||
break;
|
||||
case cull_distance:
|
||||
name = "gl_CullDistanceMESA";
|
||||
name = "gl_ClipDistanceMESA";
|
||||
break;
|
||||
case tess_level_outer:
|
||||
name = "gl_TessLevelOuterMESA";
|
||||
|
@@ -169,6 +169,7 @@ lower_distance_visitor::visit(ir_variable *ir)
|
||||
*new_var = ir->clone(ralloc_parent(ir), NULL);
|
||||
(*new_var)->name = ralloc_strdup(*new_var, GLSL_CLIP_VAR_NAME);
|
||||
(*new_var)->data.location = VARYING_SLOT_CLIP_DIST0;
|
||||
(*new_var)->data.assigned = true;
|
||||
|
||||
if (!ir->type->fields.array->is_array()) {
|
||||
/* gl_ClipDistance (used for vertex, tessellation evaluation and
|
||||
|
Reference in New Issue
Block a user