diff options
author | Jason Ekstrand <[email protected]> | 2016-10-21 14:15:03 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-11-16 10:11:29 -0800 |
commit | 21943c35f75d90f464f8495f5282037e1c7c79d0 (patch) | |
tree | 72c87e3045ac88dd1c6ca8bb8ed3caed11c9b3b5 /src/intel/blorp/blorp_clear.c | |
parent | 570a0e844b4be3bc5546b860e9968b55b2f3909d (diff) |
intel/blorp: Handle NIR clear inputs the same way as blit inputs
By using offsetof() we can ensure that adding fiels to wm_inputs is always
safe as long as we maintain alignment.
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel/blorp/blorp_clear.c')
-rw-r--r-- | src/intel/blorp/blorp_clear.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index 2b8af18019d..e4a4acb1f08 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -60,10 +60,8 @@ blorp_params_get_clear_kernel(struct blorp_context *blorp, nir_builder_init_simple_shader(&b, mem_ctx, MESA_SHADER_FRAGMENT, NULL); b.shader->info->name = ralloc_strdup(b.shader, "BLORP-clear"); - nir_variable *v_color = nir_variable_create(b.shader, nir_var_shader_in, - glsl_vec4_type(), "v_color"); - v_color->data.location = VARYING_SLOT_VAR0; - v_color->data.interpolation = INTERP_MODE_FLAT; + nir_variable *v_color = + BLORP_CREATE_NIR_INPUT(b.shader, clear_color, glsl_vec4_type()); nir_variable *frag_color = nir_variable_create(b.shader, nir_var_shader_out, glsl_vec4_type(), |