summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_compiler.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp2
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;