unsigned actual_array_size;
switch (this->lowered_builtin_array_variable) {
case clip_distance:
- actual_array_size = prog->LastClipDistanceArraySize;
+ actual_array_size = prog->last_vert_prog ?
+ prog->last_vert_prog->info.clip_distance_array_size : 0;
break;
case cull_distance:
- actual_array_size = prog->LastCullDistanceArraySize;
+ actual_array_size = prog->last_vert_prog ?
+ prog->last_vert_prog->info.cull_distance_array_size : 0;
break;
case tess_level_outer:
actual_array_size = 4;
}
}
- if (num_shaders[MESA_SHADER_GEOMETRY] > 0) {
- prog->LastClipDistanceArraySize = prog->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program->info.clip_distance_array_size;
- prog->LastCullDistanceArraySize = prog->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program->info.cull_distance_array_size;
- } else if (num_shaders[MESA_SHADER_TESS_EVAL] > 0) {
- prog->LastClipDistanceArraySize = prog->_LinkedShaders[MESA_SHADER_TESS_EVAL]->Program->info.clip_distance_array_size;
- prog->LastCullDistanceArraySize = prog->_LinkedShaders[MESA_SHADER_TESS_EVAL]->Program->info.cull_distance_array_size;
- } else if (num_shaders[MESA_SHADER_VERTEX] > 0) {
- prog->LastClipDistanceArraySize = prog->_LinkedShaders[MESA_SHADER_VERTEX]->Program->info.clip_distance_array_size;
- prog->LastCullDistanceArraySize = prog->_LinkedShaders[MESA_SHADER_VERTEX]->Program->info.cull_distance_array_size;
- } else {
- prog->LastClipDistanceArraySize = 0; /* Not used */
- prog->LastCullDistanceArraySize = 0; /* Not used */
- }
-
/* Here begins the inter-stage linking phase. Some initial validation is
* performed, then locations are assigned for uniforms, attributes, and
* varyings.
*/
struct exec_list EmptyUniformLocations;
- /**
- * Size of the gl_ClipDistance array that is output from the last pipeline
- * stage before the fragment shader.
- */
- unsigned LastClipDistanceArraySize;
- unsigned LastCullDistanceArraySize;
-
/**
* Total number of explicit uniform location including inactive uniforms.
*/