summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Pohjolainen <topi.pohjolainen@intel.com>2016-05-17 15:44:39 +0300
committerTopi Pohjolainen <topi.pohjolainen@intel.com>2016-07-04 08:37:51 +0300
commit73f78ab44bff8e02b699940f830d50789d4edf34 (patch)
treec563cc9c131d59139aed5fbded98365abcc0ddc4
parentf2c472fcb330c42126e36789c6a2e6e8d96f45db (diff)
i965/blorp: Rename push constants to inputs
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp.h8
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_blit.cpp24
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_clear.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/gen6_blorp.c6
-rw-r--r--src/mesa/drivers/dri/i965/gen7_blorp.c2
5 files changed, 22 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index b895e393b374..a4036c1d0a9b 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp.h
@@ -179,7 +179,7 @@ struct brw_blorp_coord_transform
float offset;
};
-struct brw_blorp_wm_push_constants
+struct brw_blorp_wm_inputs
{
uint32_t dst_x0;
uint32_t dst_x1;
@@ -201,11 +201,11 @@ struct brw_blorp_wm_push_constants
};
#define BRW_BLORP_NUM_PUSH_CONSTANT_DWORDS \
- (sizeof(struct brw_blorp_wm_push_constants) / 4)
+ (sizeof(struct brw_blorp_wm_inputs) / 4)
/* Every 32 bytes of push constant data constitutes one GEN register. */
static const unsigned int BRW_BLORP_NUM_PUSH_CONST_REGS =
- sizeof(struct brw_blorp_wm_push_constants) / 32;
+ sizeof(struct brw_blorp_wm_inputs) / 32;
struct brw_blorp_prog_data
{
@@ -255,7 +255,7 @@ struct brw_blorp_params
unsigned resolve_type;
};
bool color_write_disable[4];
- struct brw_blorp_wm_push_constants wm_push_consts;
+ struct brw_blorp_wm_inputs wm_inputs;
unsigned num_draw_buffers;
unsigned num_layers;
uint32_t wm_prog_kernel;
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index cdb6b330cdc4..16d2504d1ae3 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -330,7 +330,7 @@ enum sampler_message_arg
};
struct brw_blorp_blit_vars {
- /* Uniforms values from brw_blorp_wm_push_constants */
+ /* Input values from brw_blorp_wm_inputs */
nir_variable *u_dst_x0;
nir_variable *u_dst_x1;
nir_variable *u_dst_y0;
@@ -357,7 +357,7 @@ brw_blorp_blit_vars_init(nir_builder *b, struct brw_blorp_blit_vars *v,
#define LOAD_UNIFORM(name, type)\
v->u_##name = nir_variable_create(b->shader, nir_var_uniform, type, #name); \
v->u_##name->data.location = \
- offsetof(struct brw_blorp_wm_push_constants, name);
+ offsetof(struct brw_blorp_wm_inputs, name);
LOAD_UNIFORM(dst_x0, glsl_uint_type())
LOAD_UNIFORM(dst_x1, glsl_uint_type())
@@ -1832,28 +1832,28 @@ brw_blorp_blit_miptrees(struct brw_context *brw,
/* Round floating point values to nearest integer to avoid "off by one texel"
* kind of errors when blitting.
*/
- params.x0 = params.wm_push_consts.dst_x0 = roundf(dst_x0);
- params.y0 = params.wm_push_consts.dst_y0 = roundf(dst_y0);
- params.x1 = params.wm_push_consts.dst_x1 = roundf(dst_x1);
- params.y1 = params.wm_push_consts.dst_y1 = roundf(dst_y1);
- params.wm_push_consts.rect_grid_x1 =
+ params.x0 = params.wm_inputs.dst_x0 = roundf(dst_x0);
+ params.y0 = params.wm_inputs.dst_y0 = roundf(dst_y0);
+ params.x1 = params.wm_inputs.dst_x1 = roundf(dst_x1);
+ params.y1 = params.wm_inputs.dst_y1 = roundf(dst_y1);
+ params.wm_inputs.rect_grid_x1 =
minify(src_mt->logical_width0, src_level) * wm_prog_key.x_scale - 1.0f;
- params.wm_push_consts.rect_grid_y1 =
+ params.wm_inputs.rect_grid_y1 =
minify(src_mt->logical_height0, src_level) * wm_prog_key.y_scale - 1.0f;
- brw_blorp_setup_coord_transform(&params.wm_push_consts.x_transform,
+ brw_blorp_setup_coord_transform(&params.wm_inputs.x_transform,
src_x0, src_x1, dst_x0, dst_x1, mirror_x);
- brw_blorp_setup_coord_transform(&params.wm_push_consts.y_transform,
+ brw_blorp_setup_coord_transform(&params.wm_inputs.y_transform,
src_y0, src_y1, dst_y0, dst_y1, mirror_y);
if (brw->gen >= 8 && params.src.mt->target == GL_TEXTURE_3D) {
/* On gen8+ we use actual 3-D textures so we need to pass the layer
* through to the sampler.
*/
- params.wm_push_consts.src_z = params.src.layer;
+ params.wm_inputs.src_z = params.src.layer;
} else {
/* On gen7 and earlier, we fake everything with 2-D textures */
- params.wm_push_consts.src_z = 0;
+ params.wm_inputs.src_z = 0;
}
if (params.dst.num_samples <= 1 && dst_mt->num_samples > 1) {
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
index 2515a04fca14..3283a083ce6d 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
@@ -150,7 +150,7 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,
params.y1 = rb->Height - fb->_Ymin;
}
- memcpy(&params.wm_push_consts.dst_x0,
+ memcpy(&params.wm_inputs.dst_x0,
ctx->Color.ClearColor.f, sizeof(float) * 4);
bool use_simd16_replicated_data = true;
@@ -175,7 +175,7 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,
!partial_clear && use_simd16_replicated_data &&
brw_is_color_fast_clear_compatible(brw, irb->mt,
&ctx->Color.ClearColor)) {
- memset(&params.wm_push_consts, 0xff, 4*sizeof(float));
+ memset(&params.wm_inputs, 0xff, 4*sizeof(float));
params.fast_clear_op = GEN7_PS_RENDER_TARGET_FAST_CLEAR_ENABLE;
brw_get_fast_clear_rect(brw, fb, irb->mt, &params.x0, &params.y0,
diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.c b/src/mesa/drivers/dri/i965/gen6_blorp.c
index eb11156dd850..cd02b2498bb9 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.c
@@ -279,10 +279,10 @@ gen6_blorp_emit_wm_constants(struct brw_context *brw,
uint32_t wm_push_const_offset;
uint32_t *constants = brw_state_batch(brw, AUB_TRACE_WM_CONSTANTS,
- sizeof(params->wm_push_consts),
+ sizeof(params->wm_inputs),
32, &wm_push_const_offset);
- const uint32_t *push_consts = (const uint32_t *)&params->wm_push_consts;
+ const uint32_t *push_consts = (const uint32_t *)&params->wm_inputs;
for (unsigned i = 0; i < params->wm_prog_data->nr_params; i++)
constants[i] = push_consts[params->wm_prog_data->param[i]];
@@ -682,7 +682,7 @@ gen6_blorp_emit_constant_ps(struct brw_context *brw,
/* Make sure the push constants fill an exact integer number of
* registers.
*/
- assert(sizeof(struct brw_blorp_wm_push_constants) % 32 == 0);
+ STATIC_ASSERT(sizeof(struct brw_blorp_wm_inputs) % 32 == 0);
/* There must be at least one register worth of push constant data. */
assert(BRW_BLORP_NUM_PUSH_CONST_REGS > 0);
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c b/src/mesa/drivers/dri/i965/gen7_blorp.c
index 3a8643f99723..e4cae1f6ca10 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.c
@@ -621,7 +621,7 @@ gen7_blorp_emit_constant_ps(struct brw_context *brw,
/* Make sure the push constants fill an exact integer number of
* registers.
*/
- assert(sizeof(struct brw_blorp_wm_push_constants) % 32 == 0);
+ STATIC_ASSERT(sizeof(struct brw_blorp_wm_inputs) % 32 == 0);
/* There must be at least one register worth of push constant data. */
assert(BRW_BLORP_NUM_PUSH_CONST_REGS > 0);