mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 23:50:11 +01:00
etnaviv: Support ARB_stencil_texturing
The hardware support for stencil texturing is unclear from RE and the feature databases. Enable this extension on halti5 GPUs as a conservative starting point. This also enables ARB_texture_stencil8. Passes: - dEQP-GLES31.functional.stencil_texturing.format.stencil_index8* - dEQP-GLES31.functional.stencil_texturing.format.depth24_* - arb_texture_stencil8 piglit - arb_stencil_texture piglit Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37578>
This commit is contained in:
parent
06738c4ef6
commit
2a14b7224b
4 changed files with 12 additions and 2 deletions
|
|
@ -184,7 +184,7 @@ GL 4.3, GLSL 4.30 -- all DONE: freedreno/a6xx, nvc0, r600, radeonsi, llvmpipe, v
|
|||
GL_ARB_robust_buffer_access_behavior DONE (freedreno, panfrost)
|
||||
GL_ARB_shader_image_size DONE (freedreno/a5xx+, softpipe, v3d, panfrost, crocus/gen7+)
|
||||
GL_ARB_shader_storage_buffer_object DONE (freedreno/a5xx+, softpipe, v3d, panfrost, crocus/gen7+)
|
||||
GL_ARB_stencil_texturing DONE (freedreno, nv50, softpipe, v3d, panfrost)
|
||||
GL_ARB_stencil_texturing DONE (freedreno, nv50, softpipe, v3d, panfrost, etnaviv/HALTI5)
|
||||
GL_ARB_texture_buffer_range DONE (freedreno, nv50, softpipe, v3d, panfrost, crocus)
|
||||
GL_ARB_texture_query_levels DONE (all drivers that support GLSL 1.30)
|
||||
GL_ARB_texture_storage_multisample DONE (all drivers that support GL_ARB_texture_multisample)
|
||||
|
|
@ -207,7 +207,7 @@ GL 4.4, GLSL 4.40 -- all DONE: freedreno/a6xx, nvc0, r600, radeonsi, llvmpipe, v
|
|||
GL_ARB_multi_bind DONE (all drivers)
|
||||
GL_ARB_query_buffer_object DONE (freedreno/a6xx)
|
||||
GL_ARB_texture_mirror_clamp_to_edge DONE (freedreno, nv50, softpipe, v3d, panfrost, crocus)
|
||||
GL_ARB_texture_stencil8 DONE (freedreno, nv50, softpipe, v3d, panfrost)
|
||||
GL_ARB_texture_stencil8 DONE (freedreno, nv50, softpipe, v3d, panfrost, etnaviv/HALTI5)
|
||||
GL_ARB_vertex_type_10f_11f_11f_rev DONE (freedreno, nv50, softpipe, panfrost, crocus)
|
||||
GL_NV_shader_atomic_int64 DONE (radeonsi, panfrost/v9+)
|
||||
|
||||
|
|
|
|||
|
|
@ -171,6 +171,8 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
|
|||
_T(X8Z24_UNORM, D24X8, NONE),
|
||||
_T(S8_UINT_Z24_UNORM, D24X8, NONE),
|
||||
|
||||
_T(S8X24_UINT, EXT_D24S8 | EXT_FORMAT, NONE),
|
||||
|
||||
_T(R9G9B9E5_FLOAT, E5B9G9R9, NONE),
|
||||
_T(R11G11B10_FLOAT, EXT_B10G11R11F | EXT_FORMAT, B10G11R11F),
|
||||
|
||||
|
|
|
|||
|
|
@ -415,6 +415,9 @@ gpu_supports_texture_format(struct etna_screen *screen, uint32_t fmt,
|
|||
(util_format_is_pure_integer(format) || util_format_is_float(format)))
|
||||
supported = VIV_FEATURE(screen, ETNA_FEATURE_HALTI2);
|
||||
|
||||
if (format == PIPE_FORMAT_S8X24_UINT)
|
||||
supported = VIV_FEATURE(screen, ETNA_FEATURE_HALTI5) &&
|
||||
!DBG_ENABLED(ETNA_DBG_NO_TEXDESC);
|
||||
|
||||
if (etna_format_needs_yuv_tiler(format))
|
||||
supported = VIV_FEATURE(screen, ETNA_FEATURE_YUV420_TILER);
|
||||
|
|
|
|||
|
|
@ -203,6 +203,11 @@ etna_create_sampler_view_desc(struct pipe_context *pctx, struct pipe_resource *p
|
|||
break;
|
||||
}
|
||||
|
||||
if (so->format == PIPE_FORMAT_S8X24_UINT) {
|
||||
sv->SAMP_CTRL0_MASK &= ~VIVS_NTE_DESCRIPTOR_SAMP_CTRL0_DEPTH_STENCIL_MODE__MASK;
|
||||
sv->SAMP_CTRL0 |= VIVS_NTE_DESCRIPTOR_SAMP_CTRL0_DEPTH_STENCIL_MODE_STENCIL;
|
||||
}
|
||||
|
||||
#define DESC_SET(x, y) buf[(TEXDESC_##x)>>2] = (y)
|
||||
DESC_SET(CONFIG0, COND(!ext && !astc, VIVS_TE_SAMPLER_CONFIG0_FORMAT(format))
|
||||
| VIVS_TE_SAMPLER_CONFIG0_TYPE(target_hw) |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue