diff options
author | Chris Forbes <[email protected]> | 2014-08-10 11:54:47 +1200 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2014-08-15 19:13:32 +1200 |
commit | 2b1204aa96cb2d1aa66cecde810b9224d457a580 (patch) | |
tree | e12eab7b4dc0f8783c27d26b9dd9229e86a44bfd /src | |
parent | 2cd6169e9298e75e4f71c358471b80eb8bf19f11 (diff) |
i965/fs: Use brw_adjust_sampler_state_pointer in fs generator too
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index d905567023e..bc1e7bf9a44 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -573,22 +573,7 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src brw_imm_ud(inst->texture_offset)); } - if (sampler >= 16) { - /* The "Sampler Index" field can only store values between 0 and 15. - * However, we can add an offset to the "Sampler State Pointer" - * field, effectively selecting a different set of 16 samplers. - * - * The "Sampler State Pointer" needs to be aligned to a 32-byte - * offset, and each sampler state is only 16-bytes, so we can't - * exclusively use the offset - we have to use both. - */ - assert(brw->gen >= 8 || brw->is_haswell); - const int sampler_state_size = 16; /* 16 bytes */ - brw_ADD(p, - get_element_ud(header_reg, 3), - get_element_ud(brw_vec8_grf(0, 0), 3), - brw_imm_ud(16 * (sampler / 16) * sampler_state_size)); - } + brw_adjust_sampler_state_pointer(p, header_reg, sampler_index, dst); brw_pop_insn_state(p); } } |