diff options
author | Eric Anholt <[email protected]> | 2017-11-02 12:24:17 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-11-07 09:40:25 -0800 |
commit | 521e1d0275e7b237ee676e0426be1b734f270944 (patch) | |
tree | 57b86fd556af69abf0a67e73a44ecfac22e124fd /src/gallium/drivers/vc5/vc5_emit.c | |
parent | a266f78741bfdf6802b49df77d4611d6084408e9 (diff) |
broadcom/vc5: Add support for anisotropic filtering.
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_emit.c')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_emit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc5/vc5_emit.c b/src/gallium/drivers/vc5/vc5_emit.c index ea646e7d510..24682d90669 100644 --- a/src/gallium/drivers/vc5/vc5_emit.c +++ b/src/gallium/drivers/vc5/vc5_emit.c @@ -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); |