Commit d56feffb authored by Connor Abbott's avatar Connor Abbott

bifrost: Document header bits used in GLES2 shaders

It's not clear why, but the blob sets these bits on every clause for
GLSL ES 1.00 shaders (i.e. shaders with "#version 100"). Their function
was determined using shader-runner.
parent 46bba4e4
......@@ -1624,12 +1624,18 @@ void DumpInstr(const AluInstr &instr, Regs nextRegs, uint64_t *consts,
}
struct Header {
uint64_t unk0 : 11;
uint64_t unk0 : 7;
// If true, convert any infinite result of any floating-point operation to
// the biggest representable number.
uint64_t suppressInf : 1;
// Convert any NaN results to 0.
uint64_t suppressNaN : 1;
uint64_t unk1 : 2;
// true if the execution mask of the next clause is the same as the mask of
// the current clause.
uint64_t backToBack : 1;
uint64_t noEndOfShader : 1;
uint64_t unk1 : 2;
uint64_t unk2 : 2;
// Set to true for fragment shaders, to implement this bit of spec text
// from section 7.1.5 of the GLSL ES spec:
//
......@@ -1698,14 +1704,21 @@ void DumpHeader(Header header)
if (header.elideWrites)
printf("we ");
if (header.suppressInf)
printf("suppress-inf ");
if (header.suppressNaN)
printf("suppress-nan ");
if (header.unk0)
printf("unk0");
if (header.unk1)
printf("unk1");
printf("unk0 ");
if (header.unk1)
printf("unk1 ");
if (header.unk2)
printf("unk2 ");
if (header.unk3)
printf("unk3");
printf("unk3 ");
if (header.unk4)
printf("unk4");
printf("unk4 ");
printf("\n");
......
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