summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2012-06-20 12:33:06 -0700
committerPaul Berry <stereotype441@gmail.com>2012-07-19 10:02:19 -0700
commita0f7b869592013b24a5bacf0ceb2bdb1e9146378 (patch)
treea97d5c5bc886811402286a8b2d19d58a365d2a42
parent5e310e9f8300a357d6bdaf098c72098518b564f3 (diff)
downloadexternal_mesa3d-a0f7b869592013b24a5bacf0ceb2bdb1e9146378.zip
external_mesa3d-a0f7b869592013b24a5bacf0ceb2bdb1e9146378.tar.gz
external_mesa3d-a0f7b869592013b24a5bacf0ceb2bdb1e9146378.tar.bz2
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>
-rw-r--r--src/mesa/program/arbprogparse.c1
-rw-r--r--src/mesa/program/program_parse.y2
-rw-r--r--src/mesa/program/program_parser.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c
index dffc8ab..72e51dd 100644
--- a/src/mesa/program/arbprogparse.c
+++ b/src/mesa/program/arbprogparse.c
@@ -120,6 +120,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
program->PixelCenterInteger = state.option.PixelCenterInteger;
program->UsesKill = state.fragment.UsesKill;
+ program->UsesDFdy = state.fragment.UsesDFdy;
if (program->Base.Instructions)
free(program->Base.Instructions);
diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y
index 4f958a9..54b1731 100644
--- a/src/mesa/program/program_parse.y
+++ b/src/mesa/program/program_parse.y
@@ -382,6 +382,8 @@ ARL_instruction: ARL maskedAddrReg ',' scalarSrcReg
VECTORop_instruction: VECTOR_OP maskedDstReg ',' swizzleSrcReg
{
+ if ($1.Opcode == OPCODE_DDY)
+ state->fragment.UsesDFdy = 1;
$$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL);
}
;
diff --git a/src/mesa/program/program_parser.h b/src/mesa/program/program_parser.h
index bc75614..ca36bb6 100644
--- a/src/mesa/program/program_parser.h
+++ b/src/mesa/program/program_parser.h
@@ -214,6 +214,7 @@ struct asm_parser_state {
struct {
unsigned UsesKill:1;
+ unsigned UsesDFdy:1;
} fragment;
};