diff options
author | Timothy Arceri <timothy.arceri@collabora.com> | 2016-05-23 16:48:05 +1000 |
---|---|---|
committer | Timothy Arceri <timothy.arceri@collabora.com> | 2016-07-21 09:10:53 +1000 |
commit | 7f53fead5cf9a85c74a94d359dd5fccfbb87856c (patch) | |
tree | d79507872d60b30595030c7828120d819020a7a4 /src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | |
parent | 09e46f99ad465ab253de3fc321f39062cfbe1984 (diff) | |
download | external_mesa3d-7f53fead5cf9a85c74a94d359dd5fccfbb87856c.zip external_mesa3d-7f53fead5cf9a85c74a94d359dd5fccfbb87856c.tar.gz external_mesa3d-7f53fead5cf9a85c74a94d359dd5fccfbb87856c.tar.bz2 |
i965: enable component packing for vs and fs
Rather than trying to work out the total number of components
used at a location we simply treat all outputs as vec4s. This
removes the need for complex code looping over varyings to match
packed locations and the need for storing the total number of
components used at each location.
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_visitor.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 156a630..6d84374 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -459,8 +459,7 @@ fs_visitor::emit_fb_writes() src0_alpha = offset(outputs[0], bld, 3); inst = emit_single_fb_write(abld, this->outputs[target], reg_undef, - src0_alpha, - this->output_components[target]); + src0_alpha, 4); inst->target = target; } } @@ -545,9 +544,7 @@ void fs_visitor::compute_clip_distance(gl_clip_plane *clip_planes) const fs_builder abld = bld.annotate("user clip distances"); this->outputs[VARYING_SLOT_CLIP_DIST0] = vgrf(glsl_type::vec4_type); - this->output_components[VARYING_SLOT_CLIP_DIST0] = 4; this->outputs[VARYING_SLOT_CLIP_DIST1] = vgrf(glsl_type::vec4_type); - this->output_components[VARYING_SLOT_CLIP_DIST1] = 4; for (int i = 0; i < key->nr_userclip_plane_consts; i++) { fs_reg u = userplane[i]; @@ -724,10 +721,8 @@ fs_visitor::emit_urb_writes(const fs_reg &gs_vertex_count) sources[length++] = reg; } } else { - for (unsigned i = 0; i < output_components[varying]; i++) + for (unsigned i = 0; i < 4; i++) sources[length++] = offset(this->outputs[varying], bld, i); - for (unsigned i = output_components[varying]; i < 4; i++) - sources[length++] = brw_imm_d(0); } break; } @@ -901,7 +896,6 @@ fs_visitor::init() this->nir_ssa_values = NULL; memset(&this->payload, 0, sizeof(this->payload)); - memset(this->output_components, 0, sizeof(this->output_components)); this->source_depth_to_render_target = false; this->runtime_check_aads_emit = false; this->first_non_payload_grf = 0; |