mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
i965: Store a clip_distance_mask field similar to cull_distance_mask.
This isn't useful for legacy GL, but will be used in Vulkan. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
19c652b29c
commit
a1a292d177
4 changed files with 7 additions and 0 deletions
|
|
@ -626,6 +626,7 @@ struct brw_vue_prog_data {
|
|||
GLuint urb_read_length;
|
||||
GLuint total_grf;
|
||||
|
||||
uint32_t clip_distance_mask;
|
||||
uint32_t cull_distance_mask;
|
||||
|
||||
/* Used for calculating urb partitions. In the VS, this is the size of the
|
||||
|
|
|
|||
|
|
@ -1376,6 +1376,8 @@ brw_compile_tes(const struct brw_compiler *compiler,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
prog_data->base.clip_distance_mask =
|
||||
((1 << nir->info->clip_distance_array_size) - 1);
|
||||
prog_data->base.cull_distance_mask =
|
||||
((1 << nir->info->cull_distance_array_size) - 1) <<
|
||||
nir->info->clip_distance_array_size;
|
||||
|
|
|
|||
|
|
@ -2121,6 +2121,8 @@ brw_compile_vs(const struct brw_compiler *compiler, void *log_data,
|
|||
|
||||
const unsigned *assembly = NULL;
|
||||
|
||||
prog_data->base.clip_distance_mask =
|
||||
((1 << shader->info->clip_distance_array_size) - 1);
|
||||
prog_data->base.cull_distance_mask =
|
||||
((1 << shader->info->cull_distance_array_size) - 1) <<
|
||||
shader->info->clip_distance_array_size;
|
||||
|
|
|
|||
|
|
@ -621,6 +621,8 @@ brw_compile_gs(const struct brw_compiler *compiler, void *log_data,
|
|||
brw_nir_lower_vue_outputs(shader, is_scalar);
|
||||
shader = brw_postprocess_nir(shader, compiler->devinfo, is_scalar);
|
||||
|
||||
prog_data->base.clip_distance_mask =
|
||||
((1 << shader->info->clip_distance_array_size) - 1);
|
||||
prog_data->base.cull_distance_mask =
|
||||
((1 << shader->info->cull_distance_array_size) - 1) <<
|
||||
shader->info->clip_distance_array_size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue