mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 22:50:08 +01:00
v3d: apply proper clamping when setting up RT
Ensure the render target values are in the proper range. This fixes `spec@!opengl 3.0@render-integer`. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22733>
This commit is contained in:
parent
b5a458859f
commit
0e466efe41
2 changed files with 8 additions and 10 deletions
|
|
@ -103,15 +103,6 @@ spec@!opengl 3.0@bindfragdata-nonexistent-variable,Fail
|
|||
spec@!opengl 3.0@clearbuffer-mixed-format,Fail
|
||||
spec@!opengl 3.0@getfragdatalocation,Fail
|
||||
spec@!opengl 3.0@minmax,Fail
|
||||
spec@!opengl 3.0@render-integer,Fail
|
||||
spec@!opengl 3.0@render-integer@GL_R8I,Fail
|
||||
spec@!opengl 3.0@render-integer@GL_R8UI,Fail
|
||||
spec@!opengl 3.0@render-integer@GL_RG8I,Fail
|
||||
spec@!opengl 3.0@render-integer@GL_RG8UI,Fail
|
||||
spec@!opengl 3.0@render-integer@GL_RGB8I,Fail
|
||||
spec@!opengl 3.0@render-integer@GL_RGB8UI,Fail
|
||||
spec@!opengl 3.0@render-integer@GL_RGBA8I,Fail
|
||||
spec@!opengl 3.0@render-integer@GL_RGBA8UI,Fail
|
||||
spec@!opengl 3.0@required-texture-attachment-formats,Fail
|
||||
spec@!opengl 3.1@minmax,Fail
|
||||
spec@!opengl 3.1@primitive-restart-xfb flush,Fail
|
||||
|
|
|
|||
|
|
@ -498,7 +498,14 @@ v3d_setup_render_target(struct v3d_job *job, int cbuf,
|
|||
*rt_bpp = MAX2(*rt_bpp, bsurf->internal_bpp);
|
||||
}
|
||||
*rt_type = surf->internal_type;
|
||||
*rt_clamp = V3D_RENDER_TARGET_CLAMP_NONE;
|
||||
if (util_format_is_srgb(surf->base.format))
|
||||
*rt_clamp = V3D_RENDER_TARGET_CLAMP_NORM;
|
||||
#if V3D_VERSION >= 42
|
||||
else if (util_format_is_pure_integer(surf->base.format))
|
||||
*rt_clamp = V3D_RENDER_TARGET_CLAMP_INT;
|
||||
#endif
|
||||
else
|
||||
*rt_clamp = V3D_RENDER_TARGET_CLAMP_NONE;
|
||||
}
|
||||
|
||||
#else /* V3D_VERSION < 40 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue