freedreno/ir3: Fix the arg to ir3_get_num_components_for_image_format()
authorEric Anholt <eric@anholt.net>
Wed, 5 Feb 2020 23:01:01 +0000 (15:01 -0800)
committerMarge Bot <eric+marge@anholt.net>
Mon, 24 Feb 2020 18:25:02 +0000 (18:25 +0000)
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@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3728>

src/freedreno/ir3/ir3_image.c
src/freedreno/ir3/ir3_image.h

index 4e96ba7e5554a2b919dc6d511951759c9fb36cc6..3fc0223c0ca0f8badb84e9d03325c7d4e6a04ebf 100644 (file)
@@ -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;
index ac9b1bab705fb8763bb686a4cd487a2de9678043..5ba1652dab11ccea98000b2bc588c884a64621a6 100644 (file)
@@ -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_ */