summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-06-29 22:07:37 -0700
committerKenneth Graunke <[email protected]>2015-07-09 17:08:42 -0700
commit64390967c1abc326875e495f233afec6e685db72 (patch)
tree26564dd448124a89d2af4d8bceb6ec4590296c0f /src/mesa
parent13372a0ce746cde6fa6e0aa3c5130e4227f123e0 (diff)
i965/vs: Remove 'c'/vs_compile from vec4_vs_visitor.
At this point, the brw_vs_compile structure only contains the key and gl_vertex_program pointer. We may as well pass and store them directly; it's simpler and more convenient (key-> instead of vs_compile->key...). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_vp.cpp9
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp11
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.h6
4 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index e5db2687aa0..42d014cb1d8 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1953,8 +1953,8 @@ brw_vs_emit(struct brw_context *brw,
if (!assembly) {
prog_data->base.dispatch_mode = DISPATCH_MODE_4X2_DUAL_OBJECT;
- vec4_vs_visitor v(brw->intelScreen->compiler, brw,
- c, prog_data, prog, mem_ctx, st_index,
+ vec4_vs_visitor v(brw->intelScreen->compiler, brw, &c->key, prog_data,
+ &c->vp->program, prog, mem_ctx, st_index,
!_mesa_is_gles3(&brw->ctx));
if (!v.run(brw_select_clip_planes(&brw->ctx))) {
if (prog) {
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp b/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp
index dcbd2405078..d1a72d787e7 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp
@@ -394,8 +394,7 @@ vec4_vs_visitor::emit_program_code()
* pull constants. Do that now.
*/
if (this->need_all_constants_in_pull_buffer) {
- const struct gl_program_parameter_list *params =
- vs_compile->vp->program.Base.Parameters;
+ const struct gl_program_parameter_list *params = vp->Base.Parameters;
unsigned i;
for (i = 0; i < params->NumParameters * 4; i++) {
stage_prog_data->pull_param[i] =
@@ -415,8 +414,7 @@ vec4_vs_visitor::setup_vp_regs()
vp_temp_regs[i] = src_reg(this, glsl_type::vec4_type);
/* PROGRAM_STATE_VAR etc. */
- struct gl_program_parameter_list *plist =
- vs_compile->vp->program.Base.Parameters;
+ struct gl_program_parameter_list *plist = vp->Base.Parameters;
for (unsigned p = 0; p < plist->NumParameters; p++) {
unsigned components = plist->Parameters[p].Size;
@@ -486,8 +484,7 @@ vec4_vs_visitor::get_vp_dst_reg(const prog_dst_register &dst)
src_reg
vec4_vs_visitor::get_vp_src_reg(const prog_src_register &src)
{
- struct gl_program_parameter_list *plist =
- vs_compile->vp->program.Base.Parameters;
+ struct gl_program_parameter_list *plist = vp->Base.Parameters;
src_reg result;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp
index 35b601a81aa..b7ec8b9c169 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp
@@ -36,7 +36,7 @@ vec4_vs_visitor::emit_prolog()
for (int i = 0; i < VERT_ATTRIB_MAX; i++) {
if (vs_prog_data->inputs_read & BITFIELD64_BIT(i)) {
- uint8_t wa_flags = vs_compile->key.gl_attrib_wa_flags[i];
+ uint8_t wa_flags = key->gl_attrib_wa_flags[i];
dst_reg reg(ATTR, i);
dst_reg reg_d = reg;
reg_d.type = BRW_REGISTER_TYPE_D;
@@ -213,20 +213,21 @@ vec4_vs_visitor::emit_thread_end()
vec4_vs_visitor::vec4_vs_visitor(const struct brw_compiler *compiler,
void *log_data,
- struct brw_vs_compile *vs_compile,
+ const struct brw_vs_prog_key *key,
struct brw_vs_prog_data *vs_prog_data,
+ struct gl_vertex_program *vp,
struct gl_shader_program *prog,
void *mem_ctx,
int shader_time_index,
bool use_legacy_snorm_formula)
: vec4_visitor(compiler, log_data,
- &vs_compile->vp->program.Base,
- &vs_compile->key.base, &vs_prog_data->base, prog,
+ &vp->Base, &key->base, &vs_prog_data->base, prog,
MESA_SHADER_VERTEX,
mem_ctx, false /* no_spills */,
shader_time_index),
- vs_compile(vs_compile),
+ key(key),
vs_prog_data(vs_prog_data),
+ vp(vp),
use_legacy_snorm_formula(use_legacy_snorm_formula)
{
}
diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h
index 3a131b0767d..76bd5f4aae4 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.h
+++ b/src/mesa/drivers/dri/i965/brw_vs.h
@@ -91,8 +91,9 @@ class vec4_vs_visitor : public vec4_visitor
public:
vec4_vs_visitor(const struct brw_compiler *compiler,
void *log_data,
- struct brw_vs_compile *vs_compile,
+ const struct brw_vs_prog_key *key,
struct brw_vs_prog_data *vs_prog_data,
+ struct gl_vertex_program *vp,
struct gl_shader_program *prog,
void *mem_ctx,
int shader_time_index,
@@ -113,8 +114,9 @@ private:
dst_reg get_vp_dst_reg(const prog_dst_register &dst);
src_reg get_vp_src_reg(const prog_src_register &src);
- struct brw_vs_compile * const vs_compile;
+ const struct brw_vs_prog_key *const key;
struct brw_vs_prog_data * const vs_prog_data;
+ struct gl_vertex_program *const vp;
src_reg *vp_temp_regs;
src_reg vp_addr_reg;