panfrost: Remove if 0'd dead code
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Fri, 8 Feb 2019 02:21:46 +0000 (02:21 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 10 Feb 2019 00:50:35 +0000 (00:50 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/midgard/cmdline.c
src/gallium/drivers/panfrost/pan_assemble.c
src/gallium/drivers/panfrost/pan_blend_shaders.c
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_swizzle.c

index 15d2bbde16a3f1f29685eda7bc276a16b045a745..1aa0323bb0dda9f57fd3aa8ce5de094ea6145489 100644 (file)
@@ -86,17 +86,6 @@ compile_blend(char **argv)
         prog = standalone_compile_shader(&options, 1, argv);
         prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program->info.stage = MESA_SHADER_FRAGMENT;
 
-#if 0
-
-        for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) {
-                if (prog->_LinkedShaders[i] == NULL)
-                        continue;
-
-                c_do_mat_op_to_vec(prog->_LinkedShaders[i]->ir);
-        }
-
-#endif
-
         midgard_program program;
         nir = glsl_to_nir(prog, MESA_SHADER_FRAGMENT, &midgard_nir_options);
         midgard_compile_shader_nir(nir, &program, true);
index 91cde49f0d261584fe3d03329e0beb035b459a10..44136acc18abcaab520db873adeceae03ea53b71 100644 (file)
@@ -73,20 +73,6 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
         int size = program.compiled.size;
         dst = program.compiled.data;
 
-        /* Inject an external shader */
-#if 0
-        char buf[4096];
-
-        if (type != JOB_TYPE_VERTEX) {
-                FILE *fp = fopen("/home/alyssa/panfrost/midgard/good.bin", "rb");
-                fread(buf, 1, 2816, fp);
-                fclose(fp);
-                dst = buf;
-                size = 2816;
-        }
-
-#endif
-
         /* Upload the shader. The lookahead tag is ORed on as a tagged pointer.
          * I bet someone just thought that would be a cute pun. At least,
          * that's how I'd do it. */
index 566c6652fda3426100efe7bf7ead460f0cebd84b..648e84b0350af0156a528da71f2110fb9c6ff8f5 100644 (file)
@@ -143,22 +143,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) {
index fb4130362e07a34c28cf393e556acfdb7f11edff..b60d67da9b4c8398dbb7dbaa4fb990a5e760d577 100644 (file)
@@ -2276,11 +2276,6 @@ panfrost_set_framebuffer_state(struct pipe_context *pctx,
         /* Force a clear XXX wrong? */
         if (ctx->last_clear.color)
                 panfrost_clear(&ctx->base, ctx->last_clear.buffers, ctx->last_clear.color, ctx->last_clear.depth, ctx->last_clear.stencil);
-
-#if 0
-        /* Don't consider the buffer dirty */
-        ctx->dirty &= ~PAN_DIRTY_CLEAR;
-#endif
 }
 
 static void *
index c021843846d59b16c04ce7a7dc2404e56cd798ac..0fe8b3cfa213858c68101375db0933af2ab783b4 100644 (file)
@@ -195,40 +195,3 @@ panfrost_swizzled_size(int width, int height, int bytes_per_pixel)
 
         return sz;
 }
-
-#if 0
-#include <stdio.h>
-#include <stdlib.h>
-#include <memory.h>
-#define TW 1920
-#define TH 1080
-void
-main()
-{
-        panfrost_generate_space_filler_indices();
-
-        uint8_t in[TW * TH * 4];
-
-        for (int i = 0; i < TW * TH * 4; ++i) in[i] = i;
-
-        uint8_t *out = malloc(TW * TH * 4 * 2);
-
-        for (int i = 0; i < 60; ++i) {
-                //swizzle_bpp4_align16(TW, TH, TW*4, TW>>4, (uint32_t *) in, (uint32_t *) out);
-                //panfrost_texture_swizzle_bpp4(TW, TH, TW*4, (uint32_t *) in, (uint32_t *) out);
-                //panfrost_texture_swizzle(TW, TH, 4, TW*4, (uint32_t *) in, (uint32_t *) out);
-
-                int block_pitch = ALIGN(TW, 16) >> 4;
-                swizzle_bpp1_align16(TW, TH, TW, (block_pitch * 256 >> 4), in, (uint8_t *) out);
-        }
-
-#if 0
-        uint8_t *reference = malloc(TW * TH * 4 * 2);
-        panfrost_texture_swizzle(TW, TH, 1, TW, (uint8_t *) in, (uint8_t *) reference);
-
-        if (memcmp(reference, out, TW * TH * 4)) printf("XXX\n");
-
-#endif
-        printf("ref %X\n", out[0]);
-}
-#endif