summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-04-27 21:05:17 -0700
committerJason Ekstrand <[email protected]>2016-05-14 13:34:52 -0700
commitc46cbe19f455b27fec717d8a80b2b07995424048 (patch)
tree35330ac2146c3fec7748d4b95bec38913ec29a95
parent50e5e1f747ad820eb491e093600a4bde9c13efba (diff)
i965/blorp: Add a prog_data_init helper
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_blit.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_clear.cpp2
4 files changed, 12 insertions, 2 deletions
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
@@ -135,6 +135,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)
{
memset(params, 0, sizeof(*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();