ir3: Add (eostsc)

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
This commit is contained in:
Rob Clark
2025-07-03 07:59:41 -07:00
committed by Marge Bot
parent fa5be473b8
commit 69e0536203
5 changed files with 10 additions and 2 deletions

View File

@@ -418,6 +418,8 @@ typedef enum ir3_instruction_flags {
/* Clamp computed LOD using the given minimum. Only for cat5. */
IR3_INSTR_CLP = BIT(25),
IR3_INSTR_EOSTSC = BIT(26),
} ir3_instruction_flags;
struct ir3_instruction {

View File

@@ -173,6 +173,7 @@ static int parse_reg(const char *str)
"(sat)" return TOKEN(T_SAT);
"(eolm)" return TOKEN(T_EOLM);
"(eogm)" return TOKEN(T_EOGM);
"(eostsc)" return TOKEN(T_EOSTSC);
"(rpt"[0-7]")" ir3_yylval.num = strtol(yytext+4, NULL, 10); return T_RPT;
"(nop"[0-7]")" ir3_yylval.num = strtol(yytext+4, NULL, 10); return T_NOP;
"("[x]?[y]?[z]?[w]?")" ir3_yylval.num = parse_wrmask(yytext); return T_WRMASK;

View File

@@ -131,6 +131,7 @@ static void print_token(FILE *file, int type, YYSTYPE value)
%token <tok> T_NOP
%token <tok> T_EOLM
%token <tok> T_EOGM
%token <tok> T_EOSTSC
/* category 0: */
%token <tok> T_OP_NOP
@@ -607,6 +608,7 @@ iflag: T_SY { iflags.flags |= IR3_INSTR_SY; }
| T_NOP { iflags.nop = $1; }
| T_EOLM { iflags.flags |= IR3_INSTR_EOLM; }
| T_EOGM { iflags.flags |= IR3_INSTR_EOGM; }
| T_EOSTSC { iflags.flags |= IR3_INSTR_EOSTSC; }
iflags:
| iflag iflags

View File

@@ -71,6 +71,7 @@ static const struct test {
INSTR_7XX(00000003_00000000, "(eolm)(eogm)nop"),
INSTR_7XX(00000001_00000000, "(eolm)nop"),
INSTR_8XX(00001004_00000000, "(ss)(eostsc)nop"),
/* cat1 */
INSTR_6XX(20244000_00000020, "mov.f32f32 r0.x, c8.x"),

View File

@@ -52,13 +52,14 @@ SOFTWARE.
<map name="EQ">!!(src->flags &amp; IR3_INSTR_EQ)</map>
<map name="EOLM">!!(src->flags &amp; IR3_INSTR_EOLM)</map>
<map name="EOGM">!!(src->flags &amp; IR3_INSTR_EOGM)</map>
<map name="EOSTSC">!!(src->flags &amp; IR3_INSTR_EOSTSC)</map>
</encode>
</bitset>
<bitset name="#instruction-cat0-0src" extends="#instruction-cat0">
<display>
{SY}{SS}{EQ}{JP}{EOLM}{EOGM}{REPEAT}{NAME}
{SY}{SS}{EQ}{JP}{EOLM}{EOGM}{EOSTSC}{REPEAT}{NAME}
</display>
<field name="EOLM" pos="32" type="bool" display="(eolm)">
<doc>
@@ -72,7 +73,8 @@ SOFTWARE.
of control flow including preambles. Doesn't seem to affect correctness.
</doc>
</field>
<pattern low="34" high="36">000</pattern>
<field name="EOSTSC" pos="34" type="bool" display="(eostsc)"/>
<pattern low="35" high="36">00</pattern>
<pattern low="37" high="39">000</pattern> <!-- BRTYPE -->
<pattern low="45" high="47">000</pattern> <!-- src1 -->
<pattern low="52" high="54">000</pattern> <!-- src0 -->