mesa: Set UsesDFdy appropriately for assembly programs.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Paul Berry
2012-06-20 12:33:06 -07:00
parent 5e310e9f83
commit a0f7b86959
3 changed files with 4 additions and 0 deletions

View File

@@ -120,6 +120,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
program->PixelCenterInteger = state.option.PixelCenterInteger; program->PixelCenterInteger = state.option.PixelCenterInteger;
program->UsesKill = state.fragment.UsesKill; program->UsesKill = state.fragment.UsesKill;
program->UsesDFdy = state.fragment.UsesDFdy;
if (program->Base.Instructions) if (program->Base.Instructions)
free(program->Base.Instructions); free(program->Base.Instructions);

View File

@@ -382,6 +382,8 @@ ARL_instruction: ARL maskedAddrReg ',' scalarSrcReg
VECTORop_instruction: VECTOR_OP maskedDstReg ',' swizzleSrcReg VECTORop_instruction: VECTOR_OP maskedDstReg ',' swizzleSrcReg
{ {
if ($1.Opcode == OPCODE_DDY)
state->fragment.UsesDFdy = 1;
$$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL); $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL);
} }
; ;

View File

@@ -214,6 +214,7 @@ struct asm_parser_state {
struct { struct {
unsigned UsesKill:1; unsigned UsesKill:1;
unsigned UsesDFdy:1;
} fragment; } fragment;
}; };