diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 4 | ||||
-rw-r--r-- | src/compiler/shader_info.h | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index e1b8cea600d..90fdd694007 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -150,8 +150,8 @@ glsl_to_nir(const struct gl_shader_program *shader_prog, shader->info->num_textures = util_last_bit(sh->Program->SamplersUsed); shader->info->num_ubos = sh->NumUniformBlocks; shader->info->num_ssbos = sh->NumShaderStorageBlocks; - shader->info->uses_clip_distance_out = - sh->Program->ClipDistanceArraySize != 0; + shader->info->clip_distance_array_size = sh->Program->ClipDistanceArraySize; + shader->info->cull_distance_array_size = sh->Program->CullDistanceArraySize; shader->info->separate_shader = shader_prog->SeparateShader; shader->info->has_transform_feedback_varyings = shader_prog->TransformFeedback.NumVarying > 0; diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index f0dfecc6aec..7ea5d9cce1f 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -67,8 +67,11 @@ typedef struct shader_info { /* Whether or not this shader ever uses textureGather() */ bool uses_texture_gather; - /* Whether or not this shader uses the gl_ClipDistance output */ - bool uses_clip_distance_out; + /* The size of the gl_ClipDistance[] array, if declared. */ + unsigned clip_distance_array_size; + + /* The size of the gl_CullDistance[] array, if declared. */ + unsigned cull_distance_array_size; /* Whether or not separate shader objects were used */ bool separate_shader; |