summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_fs.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-01-18 22:48:11 -0800
committerEric Anholt <eric@anholt.net>2011-01-19 16:29:14 -0800
commit382c2d99da3f219a5b82f391a81b534b6b44ebce (patch)
treead6d935ada8a7708421d0da44394fd2bd31bb1bb /src/mesa/drivers/dri/i965/brw_fs.h
parent1991d92207cf629ba4ceead4bfc3f768d7b9e402 (diff)
i965/fs: Add a helper function for detecting math opcodes.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 7c991f3265..f0497957bc 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -313,6 +313,18 @@ public:
opcode == FS_OPCODE_TXL);
}
+ bool is_math()
+ {
+ return (opcode == FS_OPCODE_RCP ||
+ opcode == FS_OPCODE_RSQ ||
+ opcode == FS_OPCODE_SQRT ||
+ opcode == FS_OPCODE_EXP2 ||
+ opcode == FS_OPCODE_LOG2 ||
+ opcode == FS_OPCODE_SIN ||
+ opcode == FS_OPCODE_COS ||
+ opcode == FS_OPCODE_POW);
+ }
+
int opcode; /* BRW_OPCODE_* or FS_OPCODE_* */
fs_reg dst;
fs_reg src[3];