v3d: enable NIR compact arrays
Now that it is exposing GLSL 1.30, and we can read clipdistance arrays in the fragment shader, let's enable this capability. It fixes `spec@glsl-1.30@execution@clipping@fs-clip-distance-interpolated,Crash`. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23232>
This commit is contained in:
parent
55df7b6415
commit
8fb16b8814
3 changed files with 13 additions and 1 deletions
|
|
@ -402,7 +402,6 @@ spec@glsl-1.10@execution@glsl-vs-inline-explosion,Crash
|
|||
spec@glsl-1.20@compiler@invalid-vec4-array-to-vec3-array-conversion.vert,Fail
|
||||
spec@glsl-1.20@execution@clipping@vs-clip-vertex-primitives,Fail
|
||||
spec@glsl-1.20@execution@fs-underflow-mul-compare-zero,Fail
|
||||
spec@glsl-1.30@execution@clipping@fs-clip-distance-interpolated,Crash
|
||||
spec@intel_performance_query@intel_performance_query-issue_2235,Fail
|
||||
spec@khr_texture_compression_astc@miptree-gles srgb-fp,Fail
|
||||
spec@khr_texture_compression_astc@miptree-gles srgb-fp@sRGB decode full precision,Fail
|
||||
|
|
|
|||
|
|
@ -50,6 +50,18 @@ v3d_get_slot_for_driver_location(nir_shader *s, uint32_t driver_location)
|
|||
if (var->data.driver_location == driver_location) {
|
||||
return var->data.location;
|
||||
}
|
||||
|
||||
/* For compact arrays, we have more than one location to
|
||||
* check.
|
||||
*/
|
||||
if (var->data.compact) {
|
||||
assert(glsl_type_is_array(var->type));
|
||||
for (int i = 0; i < DIV_ROUND_UP(glsl_array_size(var->type), 4); i++) {
|
||||
if ((var->data.driver_location + i) == driver_location) {
|
||||
return var->data.location;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_CONDITIONAL_RENDER:
|
||||
case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
|
||||
case PIPE_CAP_CUBE_MAP_ARRAY:
|
||||
case PIPE_CAP_NIR_COMPACT_ARRAYS:
|
||||
return 1;
|
||||
|
||||
case PIPE_CAP_POLYGON_OFFSET_CLAMP:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue