mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
mesa/st/sampler_view: use a local variable for texture sv format
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit 64dd6bf8aa)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
This commit is contained in:
parent
6026a01827
commit
9aeca4c8b1
2 changed files with 4 additions and 4 deletions
|
|
@ -994,7 +994,7 @@
|
|||
"description": "mesa/st/sampler_view: use a local variable for texture sv format",
|
||||
"nominated": false,
|
||||
"nomination_type": 0,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -535,6 +535,8 @@ st_get_texture_sampler_view_from_stobj(struct st_context *st,
|
|||
if (!ignore_srgb_decode && samp->Attrib.sRGBDecode == GL_SKIP_DECODE_EXT)
|
||||
srgb_skip_decode = true;
|
||||
|
||||
enum pipe_format format = st_get_sampler_view_format(st, texObj,
|
||||
srgb_skip_decode);
|
||||
simple_mtx_lock(&texObj->validate_mutex);
|
||||
sv = st_texture_get_current_sampler_view(st, texObj);
|
||||
|
||||
|
|
@ -547,7 +549,7 @@ st_get_texture_sampler_view_from_stobj(struct st_context *st,
|
|||
struct pipe_sampler_view *view = sv->view;
|
||||
assert(texObj->pt == view->texture);
|
||||
assert(!check_sampler_swizzle(st, texObj, view, glsl130_or_later));
|
||||
assert(st_get_sampler_view_format(st, texObj, srgb_skip_decode) == view->format);
|
||||
assert(format == view->format);
|
||||
assert(gl_target_to_pipe(texObj->Target) == view->target);
|
||||
assert(texObj->level_override >= 0 ||
|
||||
texObj->Attrib.MinLevel +
|
||||
|
|
@ -564,8 +566,6 @@ st_get_texture_sampler_view_from_stobj(struct st_context *st,
|
|||
}
|
||||
|
||||
/* create new sampler view */
|
||||
enum pipe_format format = st_get_sampler_view_format(st, texObj,
|
||||
srgb_skip_decode);
|
||||
struct pipe_sampler_view *view =
|
||||
st_create_texture_sampler_view_from_stobj(st, texObj, format,
|
||||
glsl130_or_later);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue