mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 02:50:16 +01:00
svga: implement sRGB rendering for imported surfaces
If texture is imported and templ format is sRGB, use compatible sRGB format to the imported texture format while creating surface view. tested with MTT piglit, glretrace, viewperf and conform Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
parent
1b415a5b28
commit
197907c926
1 changed files with 9 additions and 2 deletions
|
|
@ -305,10 +305,17 @@ svga_create_surface_view(struct pipe_context *pipe,
|
|||
bind = PIPE_BIND_RENDER_TARGET;
|
||||
}
|
||||
|
||||
if (tex->imported)
|
||||
if (tex->imported) {
|
||||
/* imported resource (a window) */
|
||||
format = tex->key.format;
|
||||
else
|
||||
if (util_format_is_srgb(surf_tmpl->format)) {
|
||||
/* sRGB rendering to window */
|
||||
format = svga_linear_to_srgb(format);
|
||||
}
|
||||
}
|
||||
else {
|
||||
format = svga_translate_format(ss, surf_tmpl->format, bind);
|
||||
}
|
||||
|
||||
assert(format != SVGA3D_FORMAT_INVALID);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue