diff options
author | Iago Toral Quiroga <[email protected]> | 2016-07-13 10:45:13 +0200 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2017-01-03 11:26:51 +0100 |
commit | df6e3aa6ae23346bad59d071d340a67be0e2a2c5 (patch) | |
tree | fdf1d196509ddfa2fbde7090711cf6c8c968748b /src/mesa/drivers | |
parent | eee2c0d7854e55e92e0e72eb0fb94ab83d702754 (diff) |
i965/vec4: fix move_push_constants_to_pull_constants() for 64-bit data
v2: adapt to changes in offset()
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 4f985a57181..944ae87a3d7 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -884,10 +884,25 @@ vec4_visitor::move_push_constants_to_pull_constants() int uniform = inst->src[i].nr; - dst_reg temp = dst_reg(this, glsl_type::vec4_type); - - emit_pull_constant_load(block, inst, temp, inst->src[i], - pull_constant_loc[uniform], src_reg()); + dst_reg temp; + if (type_sz(inst->src[i].type) != 8) { + temp = dst_reg(this, glsl_type::vec4_type); + emit_pull_constant_load(block, inst, temp, inst->src[i], + pull_constant_loc[uniform], src_reg()); + } else { + dst_reg shuffled = dst_reg(this, glsl_type::dvec4_type); + dst_reg shuffled_float = retype(shuffled, BRW_REGISTER_TYPE_F); + + emit_pull_constant_load(block, inst, shuffled_float, inst->src[i], + pull_constant_loc[uniform], src_reg()); + emit_pull_constant_load(block, inst, + offset(shuffled_float, 8, 1), + offset(inst->src[i], 8, 1), + pull_constant_loc[uniform], src_reg()); + + temp = dst_reg(this, glsl_type::dvec4_type); + shuffle_64bit_data(temp, src_reg(shuffled), false, block, inst); + } inst->src[i].file = temp.file; inst->src[i].nr = temp.nr; |