diff options
author | Kenneth Graunke <[email protected]> | 2016-10-03 23:41:09 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-11-19 12:30:25 -0800 |
commit | a1a292d17710a2bfb33f798c9f5fda73a5985261 (patch) | |
tree | 45526874a21de4fae4b9f69da121dcd32f9801eb | |
parent | 19c652b29ce7271374cd0951bdadc9840964e78e (diff) |
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 <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_compiler.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 2 |
4 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h index c2400f99352..65a74784642 100644 --- a/src/mesa/drivers/dri/i965/brw_compiler.h +++ b/src/mesa/drivers/dri/i965/brw_compiler.h @@ -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 diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 8601bb5ea18..bee4d8875c5 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -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; diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 4da8f6e09d6..b9e592f65f6 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -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; diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp index 5e2dcc08540..900d9d345ec 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp @@ -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; |