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_blit.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_blit.c')
-rw-r--r-- | src/intel/blorp/blorp_blit.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index 893a4bc4b16..27af21f2548 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -67,13 +67,7 @@ brw_blorp_blit_vars_init(nir_builder *b, struct brw_blorp_blit_vars *v, assert(!key->use_kill || !(key->blend && key->blit_scaled)); #define LOAD_INPUT(name, type)\ - v->v_##name = nir_variable_create(b->shader, nir_var_shader_in, \ - type, #name); \ - v->v_##name->data.interpolation = INTERP_MODE_FLAT; \ - v->v_##name->data.location = VARYING_SLOT_VAR0 + \ - offsetof(struct brw_blorp_wm_inputs, name) / (4 * sizeof(float)); \ - v->v_##name->data.location_frac = \ - (offsetof(struct brw_blorp_wm_inputs, name) / sizeof(float)) % 4; + v->v_##name = BLORP_CREATE_NIR_INPUT(b->shader, name, type); LOAD_INPUT(discard_rect, glsl_vec4_type()) LOAD_INPUT(rect_grid, glsl_vec4_type()) |