mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 13:30:11 +01:00
i965: correctly assign SamplerCount of INTERFACE_DESCRIPTOR_DATA
We were dividing by 4 twice. This also papered over a bug where we were neglecting to clamp the sampler count to the [0, 16] range. This should have no functional impact, it only affects prefetching. v2 [Kenneth Graunke]: - Clamp sampler_count to [0, 16] to avoid overflowing the valid values for this field. Write a commit message. Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
992e2cf57f
commit
d30b5f2f9b
1 changed files with 1 additions and 1 deletions
|
|
@ -4237,7 +4237,7 @@ genX(upload_cs_state)(struct brw_context *brw)
|
|||
const struct GENX(INTERFACE_DESCRIPTOR_DATA) idd = {
|
||||
.KernelStartPointer = brw->cs.base.prog_offset,
|
||||
.SamplerStatePointer = stage_state->sampler_offset,
|
||||
.SamplerCount = DIV_ROUND_UP(stage_state->sampler_count, 4) >> 2,
|
||||
.SamplerCount = DIV_ROUND_UP(CLAMP(stage_state->sampler_count, 0, 16), 4),
|
||||
.BindingTablePointer = stage_state->bind_bo_offset,
|
||||
.ConstantURBEntryReadLength = cs_prog_data->push.per_thread.regs,
|
||||
.NumberofThreadsinGPGPUThreadGroup = cs_prog_data->threads,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue