mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-12 00:20:43 +01:00
broadcom/vc5: Add support for anisotropic filtering.
This commit is contained in:
parent
a266f78741
commit
521e1d0275
1 changed files with 9 additions and 0 deletions
|
|
@ -166,6 +166,15 @@ emit_one_texture(struct vc5_context *vc5, struct vc5_texture_stateobj *stage_tex
|
|||
if (mag_img_filter == PIPE_TEX_FILTER_NEAREST)
|
||||
unpacked.filter++;
|
||||
|
||||
if (psampler->max_anisotropy > 8)
|
||||
unpacked.filter = V3D_TMU_FILTER_ANISOTROPIC_16_1;
|
||||
else if (psampler->max_anisotropy > 4)
|
||||
unpacked.filter = V3D_TMU_FILTER_ANISOTROPIC_8_1;
|
||||
else if (psampler->max_anisotropy > 2)
|
||||
unpacked.filter = V3D_TMU_FILTER_ANISOTROPIC_4_1;
|
||||
else if (psampler->max_anisotropy)
|
||||
unpacked.filter = V3D_TMU_FILTER_ANISOTROPIC_2_1;
|
||||
|
||||
uint8_t packed[cl_packet_length(TEXTURE_SHADER_STATE)];
|
||||
cl_packet_pack(TEXTURE_SHADER_STATE)(&job->indirect, packed, &unpacked);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue