panfrost: Remove if 0'd dead code

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig 2019-02-08 02:21:46 +00:00
parent e91e1786c5
commit b1213a3947
5 changed files with 0 additions and 83 deletions

View 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);

View 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. */

View 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) {

View 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 *

View 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