compiler: Store the clip/cull distance array sizes in shader_info.
We switched from a boolean to array lengths in gl_program a while back. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -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_textures = util_last_bit(sh->Program->SamplersUsed);
|
||||||
shader->info->num_ubos = sh->NumUniformBlocks;
|
shader->info->num_ubos = sh->NumUniformBlocks;
|
||||||
shader->info->num_ssbos = sh->NumShaderStorageBlocks;
|
shader->info->num_ssbos = sh->NumShaderStorageBlocks;
|
||||||
shader->info->uses_clip_distance_out =
|
shader->info->clip_distance_array_size = sh->Program->ClipDistanceArraySize;
|
||||||
sh->Program->ClipDistanceArraySize != 0;
|
shader->info->cull_distance_array_size = sh->Program->CullDistanceArraySize;
|
||||||
shader->info->separate_shader = shader_prog->SeparateShader;
|
shader->info->separate_shader = shader_prog->SeparateShader;
|
||||||
shader->info->has_transform_feedback_varyings =
|
shader->info->has_transform_feedback_varyings =
|
||||||
shader_prog->TransformFeedback.NumVarying > 0;
|
shader_prog->TransformFeedback.NumVarying > 0;
|
||||||
|
@@ -67,8 +67,11 @@ typedef struct shader_info {
|
|||||||
/* Whether or not this shader ever uses textureGather() */
|
/* Whether or not this shader ever uses textureGather() */
|
||||||
bool uses_texture_gather;
|
bool uses_texture_gather;
|
||||||
|
|
||||||
/* Whether or not this shader uses the gl_ClipDistance output */
|
/* The size of the gl_ClipDistance[] array, if declared. */
|
||||||
bool uses_clip_distance_out;
|
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 */
|
/* Whether or not separate shader objects were used */
|
||||||
bool separate_shader;
|
bool separate_shader;
|
||||||
|
@@ -1054,7 +1054,8 @@ prog_to_nir(const struct gl_program *prog,
|
|||||||
s->info->num_ssbos = 0;
|
s->info->num_ssbos = 0;
|
||||||
s->info->num_images = 0;
|
s->info->num_images = 0;
|
||||||
s->info->uses_texture_gather = false;
|
s->info->uses_texture_gather = false;
|
||||||
s->info->uses_clip_distance_out = false;
|
s->info->clip_distance_array_size = 0;
|
||||||
|
s->info->cull_distance_array_size = 0;
|
||||||
s->info->separate_shader = false;
|
s->info->separate_shader = false;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
Reference in New Issue
Block a user