mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
freedreno/a6xx: ARB_texture_filter_minmax
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
This commit is contained in:
parent
286b7723f0
commit
babe8a10d9
3 changed files with 22 additions and 1 deletions
|
|
@ -315,7 +315,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
|
|||
GL_ARB_sparse_texture DONE (radeonsi/gfx9+, zink)
|
||||
GL_ARB_sparse_texture2 DONE (radeonsi/gfx9+, zink)
|
||||
GL_ARB_sparse_texture_clamp DONE (radeonsi/gfx9+, zink)
|
||||
GL_ARB_texture_filter_minmax DONE (nvc0/gm200+, zink)
|
||||
GL_ARB_texture_filter_minmax DONE (freedreno/a6xx, nvc0/gm200+, zink)
|
||||
GL_ARM_shader_framebuffer_fetch_depth_stencil DONE (llvmpipe)
|
||||
GL_EXT_shader_framebuffer_fetch DONE (freedreno/a6xx, iris/gen9+, llvmpipe, panfrost, virgl, zink, asahi)
|
||||
GL_EXT_shader_framebuffer_fetch_non_coherent DONE (freedreno/a6xx, iris, llvmpipe, panfrost, virgl, zink, asahi)
|
||||
|
|
|
|||
|
|
@ -91,6 +91,20 @@ tex_filter(unsigned filter, bool aniso)
|
|||
}
|
||||
}
|
||||
|
||||
static enum a6xx_reduction_mode
|
||||
reduction_mode(unsigned reduction_mode)
|
||||
{
|
||||
switch (reduction_mode) {
|
||||
default:
|
||||
case PIPE_TEX_REDUCTION_WEIGHTED_AVERAGE:
|
||||
return A6XX_REDUCTION_MODE_AVERAGE;
|
||||
case PIPE_TEX_REDUCTION_MIN:
|
||||
return A6XX_REDUCTION_MODE_MIN;
|
||||
case PIPE_TEX_REDUCTION_MAX:
|
||||
return A6XX_REDUCTION_MODE_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
setup_border_color(struct fd_screen *screen,
|
||||
const struct pipe_sampler_state *sampler,
|
||||
|
|
@ -303,6 +317,9 @@ fd6_sampler_state_create(struct pipe_context *pctx,
|
|||
cso->min_img_filter == PIPE_TEX_FILTER_LINEAR)
|
||||
so->texsamp2 |= A6XX_TEX_SAMP_2_CHROMA_LINEAR;
|
||||
|
||||
so->texsamp2 |=
|
||||
A6XX_TEX_SAMP_2_REDUCTION_MODE(reduction_mode(cso->reduction_mode));
|
||||
|
||||
return so;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -322,6 +322,10 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_DEPTH_CLIP_DISABLE_SEPARATE:
|
||||
return is_a6xx(screen);
|
||||
|
||||
case PIPE_CAP_SAMPLER_REDUCTION_MINMAX:
|
||||
case PIPE_CAP_SAMPLER_REDUCTION_MINMAX_ARB:
|
||||
return is_a6xx(screen) && screen->info->a6xx.has_sampler_minmax;
|
||||
|
||||
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
|
||||
return is_a6xx(screen) && screen->info->a6xx.has_sample_locations;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue