From: Jason Ekstrand Date: Thu, 28 Apr 2016 04:05:17 +0000 (-0700) Subject: i965/blorp: Add a prog_data_init helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c46cbe19f455b27fec717d8a80b2b07995424048;p=mesa.git i965/blorp: Add a prog_data_init helper Reviewed-by: Topi Pohjolainen --- diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index 85402aaa456..8fd936323c0 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -134,6 +134,14 @@ brw_blorp_compute_tile_offsets(const struct brw_blorp_surface_info *info, } +void +brw_blorp_prog_data_init(struct brw_blorp_prog_data *prog_data) +{ + prog_data->first_curbe_grf = 0; + prog_data->persample_msaa_dispatch = false; +} + + void brw_blorp_params_init(struct brw_blorp_params *params) { diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h index d61e9d5a0f3..8c1f92bb59f 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.h +++ b/src/mesa/drivers/dri/i965/brw_blorp.h @@ -214,6 +214,8 @@ struct brw_blorp_prog_data bool persample_msaa_dispatch; }; +void brw_blorp_prog_data_init(struct brw_blorp_prog_data *prog_data); + struct brw_blorp_params { uint32_t x0; diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index 2e69e96d8ab..b263720f73d 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp @@ -632,7 +632,7 @@ brw_blorp_blit_program::compile(struct brw_context *brw, bool debug_flag, (key->dst_samples == 0)); /* Set up prog_data */ - memset(&prog_data, 0, sizeof(prog_data)); + brw_blorp_prog_data_init(&prog_data); prog_data.persample_msaa_dispatch = key->persample_msaa_dispatch; alloc_regs(); diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index 23a7594ef58..f1eb693fd27 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp @@ -160,7 +160,7 @@ brw_blorp_const_color_program::compile(struct brw_context *brw, GLuint *program_size) { /* Set up prog_data */ - memset(&prog_data, 0, sizeof(prog_data)); + brw_blorp_prog_data_init(&prog_data); prog_data.persample_msaa_dispatch = false; alloc_regs();