[Mesa-dev] [PATCH 21/23] i965: Replace sizeof(struct gen7_sampler_state) with the size itself.
Kenneth Graunke
kenneth at whitecape.org
Tue Jul 29 16:29:26 PDT 2014
These are the last users of struct gen7_sampler_state.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 +-
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 2 +-
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | 3 +--
src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp | 3 +--
4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 8e4a31d..9edffe5 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -580,7 +580,7 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src
get_element_ud(header_reg, 3),
get_element_ud(brw_vec8_grf(0, 0), 3),
brw_imm_ud(16 * (inst->sampler / 16) *
- sizeof(gen7_sampler_state)));
+ (4 * sizeof(uint32_t))));
}
brw_pop_insn_state(p);
}
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index 5266f81..9c6a22d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -352,7 +352,7 @@ vec4_generator::generate_tex(vec4_instruction *inst,
get_element_ud(header, 3),
get_element_ud(brw_vec8_grf(0, 0), 3),
brw_imm_ud(16 * (inst->sampler / 16) *
- sizeof(gen7_sampler_state)));
+ (4 * sizeof(uint32_t))));
}
brw_pop_insn_state(p);
}
diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
index 4f0cf70..740e3ec 100644
--- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
@@ -270,8 +270,7 @@ gen8_fs_generator::generate_tex(fs_inst *ir,
gen8_instruction *add =
ADD(get_element_ud(src, 3),
get_element_ud(brw_vec8_grf(0, 0), 3),
- brw_imm_ud(16 * (ir->sampler / 16) *
- sizeof(gen7_sampler_state)));
+ brw_imm_ud(16 * (ir->sampler / 16) * (4 * sizeof(uint32_t))));
gen8_set_mask_control(add, BRW_MASK_DISABLE);
}
diff --git a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp
index 4f9b2a3..511cab1 100644
--- a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp
@@ -125,8 +125,7 @@ gen8_vec4_generator::generate_tex(vec4_instruction *ir, struct brw_reg dst)
gen8_instruction *add =
ADD(get_element_ud(brw_message_reg(ir->base_mrf), 3),
get_element_ud(brw_vec8_grf(0, 0), 3),
- brw_imm_ud(16 * (ir->sampler / 16) *
- sizeof(gen7_sampler_state)));
+ brw_imm_ud(16 * (ir->sampler / 16) * (4 * sizeof(uint32_t))));
gen8_set_mask_control(add, BRW_MASK_DISABLE);
}
--
2.0.2
More information about the mesa-dev
mailing list