compiler: Mark clip/cull distance arrays as compact before lowering.

nir_lower_clip_cull_distance_arrays() marks the combined clip/cull
distance array as compact.  However, when translating in from GLSL
or SPIR-V, we were not marking the original float[] arrays as compact.

We should do so.  That way, we can detect these corner cases properly.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Kenneth Graunke
2019-01-23 01:55:45 -08:00
parent 3327c93510
commit ef99f4c8d1
2 changed files with 14 additions and 0 deletions

View File

@@ -1444,6 +1444,8 @@ apply_var_decoration(struct vtn_builder *b,
switch (builtin) {
case SpvBuiltInTessLevelOuter:
case SpvBuiltInTessLevelInner:
case SpvBuiltInClipDistance:
case SpvBuiltInCullDistance:
var_data->compact = true;
break;
case SpvBuiltInFragCoord: