zink: handle culldistance xfb outputs like clipdistance
fixes:
spec@ext_transform_feedback@builtin-varyings gl_culldistance
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18724>
(cherry picked from commit 21ba47c821
)
This commit is contained in:

committed by
Dylan Baker

parent
d600acf6d9
commit
7cb53bcf6f
@@ -1192,7 +1192,7 @@
|
||||
"description": "zink: handle culldistance xfb outputs like clipdistance",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
@@ -1614,7 +1614,7 @@ emit_so_outputs(struct ntv_context *ctx,
|
||||
for (unsigned c = 0; c < so_output.num_components; c++) {
|
||||
components[c] = so_output.start_component + c;
|
||||
/* this is the second half of a 2 * vec4 array */
|
||||
if (slot == VARYING_SLOT_CLIP_DIST1)
|
||||
if (slot == VARYING_SLOT_CLIP_DIST1 || slot == VARYING_SLOT_CULL_DIST1)
|
||||
components[c] += 4;
|
||||
}
|
||||
/* OpVectorShuffle can select vector members into a differently-sized vector */
|
||||
@@ -1645,7 +1645,7 @@ emit_so_outputs(struct ntv_context *ctx,
|
||||
uint32_t member = so_output.start_component + c;
|
||||
SpvId base_type = get_glsl_basetype(ctx, glsl_get_base_type(bare_type));
|
||||
|
||||
if (slot == VARYING_SLOT_CLIP_DIST1)
|
||||
if (slot == VARYING_SLOT_CLIP_DIST1 || slot == VARYING_SLOT_CULL_DIST1)
|
||||
member += 4;
|
||||
components[idx] = spirv_builder_emit_composite_extract(&ctx->builder, base_type, src, &member, 1);
|
||||
if (glsl_type_is_64bit(bare_type)) {
|
||||
|
Reference in New Issue
Block a user