From ab3f6015aa7227da3137b60456deb3905680f95f Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 30 Oct 2007 11:32:16 -0600 Subject: [PATCH] Disable debug code. Basic code for PixelTranslfer ops and glDrawPixels works now. A pixel transfer program is generated and combined with the current fragment shader. --- src/mesa/state_tracker/st_atom_pixeltransfer.c | 2 ++ src/mesa/state_tracker/st_cb_drawpixels.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c index b1fce817558..d3abf87d7db 100644 --- a/src/mesa/state_tracker/st_atom_pixeltransfer.c +++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c @@ -128,9 +128,11 @@ get_pixel_transfer_program(GLcontext *ctx) fp->Base.NumInstructions = ic; fp->Base.Parameters = params; +#if 0 printf("========= pixel transfer prog\n"); _mesa_print_program(&fp->Base); _mesa_print_parameter_list(fp->Base.Parameters); +#endif return fp; } diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index ed0ef71192d..ff7aa7d74b5 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -184,15 +184,21 @@ make_drawpix_fragment_shader(struct st_context *st) struct st_fragment_program *stfp; struct gl_program *p; - printf("====== drawpix combine progs\n"); + /* + * XXX Use st_program's serial numbers to determine when the + * user-provided program and pixel-transfer program to avoid + * needless combining/translation here. + */ + p = _mesa_combine_programs(ctx, &st->pixel_transfer_program->Base, &ctx->FragmentProgram._Current->Base); - +#if 0 _mesa_print_program(p); printf("InputsRead: 0x%x\n", p->InputsRead); printf("OutputsWritten: 0x%x\n", p->OutputsWritten); _mesa_print_parameter_list(p->Parameters); +#endif stfp = (struct st_fragment_program *) p; st_translate_fragment_program(st, stfp, NULL, -- 2.30.2