panfrost: Implement missing texture formats
[mesa.git] / src / gallium / drivers / panfrost / pan_blend_shaders.c
index 566c6652fda3426100efe7bf7ead460f0cebd84b..fadcdecb044842a8cd19d586a26a6b73b5cdb29b 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 #include "pan_blend_shaders.h"
+#include "pan_util.h"
 #include "midgard/midgard_compile.h"
 #include "compiler/nir/nir_builder.h"
 //#include "gallium/auxiliary/nir/nir_lower_blend.h"
@@ -130,7 +131,8 @@ panfrost_make_blend_shader(struct panfrost_context *ctx, struct panfrost_blend_s
         /* Build a trivial blend shader */
         nir_store_var(b, c_out, nir_blending_f(blend, b, s_src, s_dst, s_con), 0xFF);
 
-        nir_print_shader(shader, stdout);
+       if (pan_debug & PAN_DBG_SHADERS)
+               nir_print_shader(shader, stdout);
 
         /* Compile the built shader */
 
@@ -143,22 +145,6 @@ panfrost_make_blend_shader(struct panfrost_context *ctx, struct panfrost_blend_s
         int size = program.compiled.size;
         uint8_t *dst = program.compiled.data;
 
-#if 0
-        midgard_program program = {
-                .work_register_count = 3,
-                .first_tag = 9,
-                //.blend_patch_offset = 16
-                .blend_patch_offset = -1,
-        };
-
-        char dst[4096];
-
-        FILE *fp = fopen("/home/alyssa/panfrost/midgard/blend.bin", "rb");
-        fread(dst, 1, 2816, fp);
-        fclose(fp);
-        int size = 2816;
-#endif
-
         /* Hot patch in constant color */
 
         if (program.blend_patch_offset >= 0) {