Module: Mesa
Branch: main
Commit: d1e33fa3456d174e6c47c20abc466fd06936ac58
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1e33fa3456d174e6c47c20abc466fd06936ac58

Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Jul 21 09:27:30 2022 -0400

mesa/st: add ignore_srgb_decode param to st_convert_sampler

same as st_get_texture_sampler_view_from_stobj, no functional changes

Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687>

---

 src/mesa/main/texturebindless.c          | 2 +-
 src/mesa/state_tracker/st_atom_sampler.c | 5 +++--
 src/mesa/state_tracker/st_texture.h      | 3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/texturebindless.c b/src/mesa/main/texturebindless.c
index 62635fd94c8..8cc2b35f232 100644
--- a/src/mesa/main/texturebindless.c
+++ b/src/mesa/main/texturebindless.c
@@ -233,7 +233,7 @@ new_texture_handle(struct gl_context *ctx, struct 
gl_texture_object *texObj,
       if (!st_finalize_texture(ctx, pipe, texObj, 0))
          return 0;
 
-      st_convert_sampler(st, texObj, sampObj, 0, &sampler, false);
+      st_convert_sampler(st, texObj, sampObj, 0, &sampler, false, false);
 
       /* TODO: Clarify the interaction of ARB_bindless_texture and 
EXT_texture_sRGB_decode */
       view = st_get_texture_sampler_view_from_stobj(st, texObj, sampObj, 0,
diff --git a/src/mesa/state_tracker/st_atom_sampler.c 
b/src/mesa/state_tracker/st_atom_sampler.c
index bf6122cddea..ad8d2730fcc 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -61,7 +61,8 @@ st_convert_sampler(const struct st_context *st,
                    const struct gl_sampler_object *msamp,
                    float tex_unit_lod_bias,
                    struct pipe_sampler_state *sampler,
-                   bool seamless_cube_map)
+                   bool seamless_cube_map,
+                   bool ignore_srgb_decode)
 {
    memcpy(sampler, &msamp->Attrib.state, sizeof(*sampler));
 
@@ -163,7 +164,7 @@ st_convert_sampler_from_unit(const struct st_context *st,
    msamp = _mesa_get_samplerobj(ctx, texUnit);
 
    st_convert_sampler(st, texobj, msamp, 
ctx->Texture.Unit[texUnit].LodBiasQuantized,
-                      sampler, ctx->Texture.CubeMapSeamless);
+                      sampler, ctx->Texture.CubeMapSeamless, true);
 }
 
 
diff --git a/src/mesa/state_tracker/st_texture.h 
b/src/mesa/state_tracker/st_texture.h
index 29e9c98a354..efdfbcea909 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -239,7 +239,8 @@ st_convert_sampler(const struct st_context *st,
                    const struct gl_sampler_object *msamp,
                    float tex_unit_lod_bias,
                    struct pipe_sampler_state *sampler,
-                   bool seamless_cube_map);
+                   bool seamless_cube_map,
+                   bool ignore_srgb_decode);
 
 void
 st_convert_sampler_from_unit(const struct st_context *st,

Reply via email to