docs: add missing code-tags
[mesa.git] / src / mesa / swrast / s_fragprog.c
index 3530b50eecde557d05e8489df3cba37c5ab16761..6fb793fb62107475d6b610af3a6722b4c5666f1f 100644 (file)
@@ -43,7 +43,7 @@ _swrast_use_fragment_program(struct gl_context *ctx)
 {
    struct gl_program *fp = ctx->FragmentProgram._Current;
    return fp && !(fp == ctx->FragmentProgram._TexEnvProgram
-                  && fp->NumInstructions == 0);
+                  && fp->arb.NumInstructions == 0);
 }
 
 /**
@@ -164,9 +164,9 @@ init_machine(struct gl_context *ctx, struct gl_program_machine *machine,
    GLfloat *wpos = span->array->attribs[VARYING_SLOT_POS][col];
 
    /* ARB_fragment_coord_conventions */
-   if (program->OriginUpperLeft)
+   if (program->info.fs.origin_upper_left)
       wpos[1] = ctx->DrawBuffer->Height - 1 - wpos[1];
-   if (!program->PixelCenterInteger) {
+   if (!program->info.fs.pixel_center_integer) {
       wpos[0] += 0.5F;
       wpos[1] += 0.5F;
    }
@@ -204,7 +204,7 @@ run_program(struct gl_context *ctx, SWspan *span, GLuint start, GLuint end)
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
    const struct gl_program *program = ctx->FragmentProgram._Current;
-   const GLbitfield64 outputsWritten = program->OutputsWritten;
+   const GLbitfield64 outputsWritten = program->info.outputs_written;
    struct gl_program_machine *machine = &swrast->FragProgMachine;
    GLuint i;
 
@@ -265,18 +265,18 @@ _swrast_exec_fragment_program( struct gl_context *ctx, SWspan *span )
    const struct gl_program *program = ctx->FragmentProgram._Current;
 
    /* incoming colors should be floats */
-   if (program->InputsRead & VARYING_BIT_COL0) {
+   if (program->info.inputs_read & VARYING_BIT_COL0) {
       assert(span->array->ChanType == GL_FLOAT);
    }
 
    run_program(ctx, span, 0, span->end);
 
-   if (program->OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_COLOR)) {
+   if (program->info.outputs_written & BITFIELD64_BIT(FRAG_RESULT_COLOR)) {
       span->interpMask &= ~SPAN_RGBA;
       span->arrayMask |= SPAN_RGBA;
    }
 
-   if (program->OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
+   if (program->info.outputs_written & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
       span->interpMask &= ~SPAN_Z;
       span->arrayMask |= SPAN_Z;
    }