summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2022-05-16 08:16:23 -0400
committerMarge Bot <emma+marge@anholt.net>2022-05-17 11:47:42 +0000
commit61d55940644b31624b5960527da1c832cf2103a3 (patch)
tree8f9097e69edc19f018c1f8663b8858acdfcfd256 /src/mesa/state_tracker/st_cb_texture.c
parent265c9af69e4c77cef9ced8cb3b0f915ffd95b155 (diff)
Revert "mesa: consider the sample count when choosing a texture format"
This reverts commit 89c94502b6650fed222abd3588e9c927811580aa. Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16524>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 15ff7d8451b..f36800feb55 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -295,7 +295,7 @@ st_pbo_get_dst_format(struct gl_context *ctx, enum pipe_texture_target target,
/* Choose the destination format by finding the best match
* for the format+type combo. */
enum pipe_format dst_format = st_choose_matching_format(st, bind, format, type,
- 0, 0, ctx->Pack.SwapBytes);
+ ctx->Pack.SwapBytes);
if (dst_format == PIPE_FORMAT_NONE) {
GLenum dst_glformat;
@@ -1033,7 +1033,7 @@ prep_teximage(struct gl_context *ctx, struct gl_texture_image *texImage,
/* oops, need to init this image again */
texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
texImage->InternalFormat, format,
- type, texImage->NumSamples);
+ type);
_mesa_init_teximage_fields(ctx, texImage,
texImage->Width, texImage->Height,
@@ -1624,7 +1624,7 @@ try_pbo_upload(struct gl_context *ctx, GLuint dims,
* support at all because of the remapping we later perform and because
* at least the Radeon driver actually supports some formats for texture
* buffers which it doesn't support for regular textures. */
- src_format = st_choose_matching_format(st, 0, format, type, 0, 0,
+ src_format = st_choose_matching_format(st, 0, format, type,
unpack->SwapBytes);
if (!src_format) {
return false;
@@ -2002,7 +2002,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
/* Choose the source format. */
src_format = st_choose_matching_format(st, PIPE_BIND_SAMPLER_VIEW,
- format, type, 0, 0, unpack->SwapBytes);
+ format, type, unpack->SwapBytes);
if (!src_format) {
goto fallback;
}