+static void
+emit_decl_sampler_view(struct ureg_program *ureg,
+ unsigned index,
+ unsigned target,
+ unsigned return_type_x,
+ unsigned return_type_y,
+ unsigned return_type_z,
+ unsigned return_type_w )
+{
+ union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3);
+
+ out[0].value = 0;
+ out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION;
+ out[0].decl.NrTokens = 3;
+ out[0].decl.File = TGSI_FILE_SAMPLER_VIEW;
+ out[0].decl.UsageMask = 0xf;
+
+ out[1].value = 0;
+ out[1].decl_range.First = index;
+ out[1].decl_range.Last = index;
+
+ out[2].value = 0;
+ out[2].decl_sampler_view.Resource = target;
+ out[2].decl_sampler_view.ReturnTypeX = return_type_x;
+ out[2].decl_sampler_view.ReturnTypeY = return_type_y;
+ out[2].decl_sampler_view.ReturnTypeZ = return_type_z;
+ out[2].decl_sampler_view.ReturnTypeW = return_type_w;
+}
+