Mesa (master): freedreno/ir3: Fix the arg to ir3_get_num_components_for_image_format()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 24 19:09:43 UTC 2020


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Feb  5 15:01:01 2020 -0800

freedreno/ir3: Fix the arg to ir3_get_num_components_for_image_format()

GLuint worked fine for storing our enum, but it should be an enum
pipe_format since the image-formats merge.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3728>

---

 src/freedreno/ir3/ir3_image.c | 2 +-
 src/freedreno/ir3/ir3_image.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/freedreno/ir3/ir3_image.c b/src/freedreno/ir3/ir3_image.c
index 4e96ba7e555..3fc0223c0ca 100644
--- a/src/freedreno/ir3/ir3_image.c
+++ b/src/freedreno/ir3/ir3_image.c
@@ -151,7 +151,7 @@ ir3_get_image_type(const nir_variable *var)
  * GL_NV_image_formats extension.
  */
 unsigned
-ir3_get_num_components_for_image_format(GLuint format)
+ir3_get_num_components_for_image_format(enum pipe_format format)
 {
 	if (format == PIPE_FORMAT_NONE)
 		return 4;
diff --git a/src/freedreno/ir3/ir3_image.h b/src/freedreno/ir3/ir3_image.h
index ac9b1bab705..5ba1652dab1 100644
--- a/src/freedreno/ir3/ir3_image.h
+++ b/src/freedreno/ir3/ir3_image.h
@@ -39,6 +39,6 @@ unsigned ir3_image_to_tex(struct ir3_ibo_mapping *mapping, unsigned image);
 unsigned ir3_get_image_slot(nir_deref_instr *deref);
 unsigned ir3_get_image_coords(const nir_variable *var, unsigned *flagsp);
 type_t ir3_get_image_type(const nir_variable *var);
-unsigned ir3_get_num_components_for_image_format(GLuint format);
+unsigned ir3_get_num_components_for_image_format(enum pipe_format);
 
 #endif /* IR3_IMAGE_H_ */



More information about the mesa-commit mailing list