intel/fs: use uint type for per_slot_offset at GS
[mesa.git] / src / intel / compiler / brw_vec4_vs_visitor.cpp
index ad7f067ad60afc6a6f0207d29c0a390a339bc4ab..8f15bc30a7c5a91f4cf89a3b662bb1c56414ba97 100644 (file)
@@ -119,12 +119,19 @@ vec4_vs_visitor::emit_clip_distances(dst_reg reg, int offset)
 void
 vec4_vs_visitor::setup_uniform_clipplane_values()
 {
+   if (key->nr_userclip_plane_consts == 0)
+      return;
+
+   assert(stage_prog_data->nr_params == (unsigned)this->uniforms * 4);
+   brw_stage_prog_data_add_params(stage_prog_data,
+                                  key->nr_userclip_plane_consts * 4);
+
    for (int i = 0; i < key->nr_userclip_plane_consts; ++i) {
       this->userplane[i] = dst_reg(UNIFORM, this->uniforms);
       this->userplane[i].type = BRW_REGISTER_TYPE_F;
       for (int j = 0; j < 4; ++j) {
          stage_prog_data->param[this->uniforms * 4 + j] =
-            (gl_constant_value *) &clip_planes[i][j];
+            BRW_PARAM_BUILTIN_CLIP_PLANE(i, j);
       }
       ++this->uniforms;
    }
@@ -164,16 +171,12 @@ vec4_vs_visitor::vec4_vs_visitor(const struct brw_compiler *compiler,
                                  const struct brw_vs_prog_key *key,
                                  struct brw_vs_prog_data *vs_prog_data,
                                  const nir_shader *shader,
-                                 gl_clip_plane *clip_planes,
                                  void *mem_ctx,
-                                 int shader_time_index,
-                                 bool use_legacy_snorm_formula)
+                                 int shader_time_index)
    : vec4_visitor(compiler, log_data, &key->tex, &vs_prog_data->base, shader,
                   mem_ctx, false /* no_spills */, shader_time_index),
      key(key),
-     vs_prog_data(vs_prog_data),
-     clip_planes(clip_planes),
-     use_legacy_snorm_formula(use_legacy_snorm_formula)
+     vs_prog_data(vs_prog_data)
 {
 }