Commit 94ec847c authored by Ilia Mirkin's avatar Ilia Mirkin Committed by Nicolai Hähnle

tgsi: add CLOCK opcode

Signed-off-by: Ilia Mirkin's avatarIlia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: default avatarNicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Samuel Pitoiset's avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
parent d0c7f924
......@@ -70,7 +70,7 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
{ 1, 2, 0, 0, 0, 0, 0, REPL, "POW", TGSI_OPCODE_POW },
{ 1, 2, 0, 0, 0, 0, 0, COMP, "XPD", TGSI_OPCODE_XPD },
{ 1, 1, 0, 0, 0, 0, 0, COMP, "U2I64", TGSI_OPCODE_U2I64 },
{ 1, 1, 0, 0, 0, 0, 0, COMP, "", 33 }, /* removed */
{ 1, 0, 0, 0, 0, 0, 0, OTHR, "CLOCK", TGSI_OPCODE_CLOCK },
{ 1, 1, 0, 0, 0, 0, 0, COMP, "I2I64", TGSI_OPCODE_I2I64 },
{ 1, 2, 0, 0, 0, 0, 0, REPL, "DPH", TGSI_OPCODE_DPH },
{ 1, 1, 0, 0, 0, 0, 0, REPL, "COS", TGSI_OPCODE_COS },
......
......@@ -1038,6 +1038,20 @@ XXX doesn't look like most of the opcodes really belong here.
dst.xy = lodq(uint, coord);
.. opcode:: CLOCK - retrieve the current shader time
Invoking this instruction multiple times in the same shader should
cause monotonically increasing values to be returned. The values
are implicitly 64-bit, so if fewer than 64 bits of precision are
available, to provide expected wraparound semantics, the value
should be shifted up so that the most significant bit of the time
is the most significant bit of the 64-bit value.
.. math::
dst.xy = clock()
Integer ISA
^^^^^^^^^^^^^^^^^^^^^^^^
These opcodes are used for integer operations.
......
......@@ -362,7 +362,7 @@ struct tgsi_property_data {
#define TGSI_OPCODE_POW 30
#define TGSI_OPCODE_XPD 31
#define TGSI_OPCODE_U2I64 32
/* gap */
#define TGSI_OPCODE_CLOCK 33
#define TGSI_OPCODE_I2I64 34
#define TGSI_OPCODE_DPH 35
#define TGSI_OPCODE_COS 36
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment