Add variable slot information to SkVMDebugInfo.
This assigns a human-readable name to a debug slot. The slot map is emitted into skslc output files, and will be used in the future to display human-readable names in the debugger. Change-Id: I288358de305239005faa5814bd1d77a38b5e05b0 Bug: skia:12614 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470400 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
6460541ee4
commit
7ab86bd3e3
@ -1,3 +1,5 @@
|
||||
/*#pragma settings SkVMDebugTrace*/
|
||||
|
||||
uniform float u1[4];
|
||||
float index_by_literal() {
|
||||
return u1[0];
|
||||
|
@ -1,3 +1,5 @@
|
||||
/*#pragma settings SkVMDebugTrace*/
|
||||
|
||||
uniform half4 colorGreen, colorRed;
|
||||
|
||||
bool test_scalar() {
|
||||
|
@ -388,6 +388,9 @@ ResultCode processCommand(std::vector<SkSL::String>& args) {
|
||||
}
|
||||
|
||||
std::unique_ptr<SkWStream> redirect = as_SkWStream(out);
|
||||
if (debugInfo) {
|
||||
debugInfo->dump(redirect.get());
|
||||
}
|
||||
builder.done().dump(redirect.get());
|
||||
return true;
|
||||
});
|
||||
|
@ -5,6 +5,7 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "include/core/SkStream.h"
|
||||
#include "include/private/SkSLProgramElement.h"
|
||||
#include "include/private/SkSLStatement.h"
|
||||
#include "include/private/SkTArray.h"
|
||||
@ -146,11 +147,8 @@ private:
|
||||
* variable's contents, and construct a Value with those ids.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Adds sufficient slots to the end of fSlot to hold the passed-in type.
|
||||
* All new slots will be initialized to `initialValue`.
|
||||
*/
|
||||
void addSlotsForType(const Type& type, skvm::Val initialValue);
|
||||
/** Appends this variable to the SkVMSlotInfo array inside of SkVMDebugInfo. */
|
||||
void addDebugSlotInfo(String varName, const Type& type, int line);
|
||||
|
||||
/**
|
||||
* Returns the slot holding v's Val(s). Allocates storage if this is first time 'v' is
|
||||
@ -261,7 +259,6 @@ private:
|
||||
|
||||
struct Slot {
|
||||
skvm::Val val;
|
||||
Type::NumberKind kind;
|
||||
};
|
||||
std::vector<Slot> fSlots;
|
||||
|
||||
@ -302,6 +299,42 @@ private:
|
||||
};
|
||||
};
|
||||
|
||||
void SkVMDebugInfo::dump(SkWStream* o) const {
|
||||
for (size_t index = 0; index < fSlotInfo.size(); ++index) {
|
||||
const SkVMSlotInfo& info = fSlotInfo[index];
|
||||
|
||||
o->writeText("$");
|
||||
o->writeDecAsText(index);
|
||||
o->writeText(" = ");
|
||||
o->writeText(info.name.c_str());
|
||||
o->writeText(" (");
|
||||
switch (info.numberKind) {
|
||||
case Type::NumberKind::kFloat: o->writeText("float"); break;
|
||||
case Type::NumberKind::kSigned: o->writeText("int"); break;
|
||||
case Type::NumberKind::kUnsigned: o->writeText("uint"); break;
|
||||
case Type::NumberKind::kBoolean: o->writeText("bool"); break;
|
||||
case Type::NumberKind::kNonnumeric: o->writeText("???"); break;
|
||||
}
|
||||
if (info.rows * info.columns > 1) {
|
||||
o->writeDecAsText(info.columns);
|
||||
if (info.rows != 1) {
|
||||
o->writeText("x");
|
||||
o->writeDecAsText(info.rows);
|
||||
}
|
||||
o->writeText(" : ");
|
||||
o->writeText("slot ");
|
||||
o->writeDecAsText(info.componentIndex + 1);
|
||||
o->writeText("/");
|
||||
o->writeDecAsText(info.rows * info.columns);
|
||||
}
|
||||
o->writeText(", L");
|
||||
o->writeDecAsText(info.line);
|
||||
o->writeText(")");
|
||||
o->newline();
|
||||
}
|
||||
o->newline();
|
||||
}
|
||||
|
||||
static Type::NumberKind base_number_kind(const Type& type) {
|
||||
if (type.typeKind() == Type::TypeKind::kMatrix || type.typeKind() == Type::TypeKind::kVector) {
|
||||
return base_number_kind(type.componentType());
|
||||
@ -455,9 +488,9 @@ void SkVMGenerator::writeFunction(const FunctionDefinition& function,
|
||||
|
||||
void SkVMGenerator::writeToSlot(int slot, skvm::Val value) {
|
||||
if (fDebugInfo && fSlots[slot].val != value) {
|
||||
if (fSlots[slot].kind == Type::NumberKind::kFloat) {
|
||||
if (fDebugInfo->fSlotInfo[slot].numberKind == Type::NumberKind::kFloat) {
|
||||
fBuilder->trace_var(this->mask(), slot, f32(value));
|
||||
} else if (fSlots[slot].kind == Type::NumberKind::kBoolean) {
|
||||
} else if (fDebugInfo->fSlotInfo[slot].numberKind == Type::NumberKind::kBoolean) {
|
||||
fBuilder->trace_var(this->mask(), slot, bool(value));
|
||||
} else {
|
||||
fBuilder->trace_var(this->mask(), slot, i32(value));
|
||||
@ -467,19 +500,24 @@ void SkVMGenerator::writeToSlot(int slot, skvm::Val value) {
|
||||
fSlots[slot].val = value;
|
||||
}
|
||||
|
||||
void SkVMGenerator::addSlotsForType(const Type& type, skvm::Val initialValue) {
|
||||
void SkVMGenerator::addDebugSlotInfo(String varName, const Type& type, int line) {
|
||||
SkASSERT(fDebugInfo);
|
||||
switch (type.typeKind()) {
|
||||
case Type::TypeKind::kArray: {
|
||||
int nslots = type.columns();
|
||||
const Type& elemType = type.componentType();
|
||||
for (int slot = 0; slot < nslots; ++slot) {
|
||||
this->addSlotsForType(elemType, initialValue);
|
||||
this->addDebugSlotInfo(varName + "[" + to_string(slot) + "]",
|
||||
elemType,
|
||||
line);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Type::TypeKind::kStruct: {
|
||||
for (const Type::Field& field : type.fields()) {
|
||||
this->addSlotsForType(*field.fType, initialValue);
|
||||
this->addDebugSlotInfo(varName + "." + field.fName,
|
||||
*field.fType,
|
||||
line);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -492,8 +530,16 @@ void SkVMGenerator::addSlotsForType(const Type& type, skvm::Val initialValue) {
|
||||
case Type::TypeKind::kMatrix: {
|
||||
Type::NumberKind numberKind = type.componentType().numberKind();
|
||||
int nslots = type.slotCount();
|
||||
|
||||
for (int slot = 0; slot < nslots; ++slot) {
|
||||
fSlots.push_back(Slot{initialValue, numberKind});
|
||||
SkVMSlotInfo slotInfo;
|
||||
slotInfo.name = varName;
|
||||
slotInfo.columns = type.columns();
|
||||
slotInfo.rows = type.rows();
|
||||
slotInfo.componentIndex = slot;
|
||||
slotInfo.numberKind = numberKind;
|
||||
slotInfo.line = line;
|
||||
fDebugInfo->fSlotInfo.push_back(std::move(slotInfo));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -508,11 +554,22 @@ size_t SkVMGenerator::getSlot(const Variable& v) {
|
||||
|
||||
size_t slot = fSlots.size(),
|
||||
nslots = v.type().slotCount();
|
||||
fSlots.reserve(slot + nslots);
|
||||
this->addSlotsForType(v.type(), fBuilder->splat(0.0f).id);
|
||||
SkASSERTF(fSlots.size() == slot + nslots,
|
||||
"addSlotsForType wrong for %s", v.type().description().c_str());
|
||||
|
||||
if (fDebugInfo) {
|
||||
// Our debug slot-info table should always have the same length as the actual slot table.
|
||||
SkASSERT(fDebugInfo->fSlotInfo.size() == slot);
|
||||
|
||||
// Append slots for this variable to our debug slot-info table.
|
||||
fDebugInfo->fSlotInfo.reserve(slot + nslots);
|
||||
this->addDebugSlotInfo(String(v.name()), v.type(), v.fLine);
|
||||
|
||||
// Confirm that we added the expected number of slots.
|
||||
SkASSERT(fDebugInfo->fSlotInfo.size() == (slot + nslots));
|
||||
}
|
||||
|
||||
// Create zeroed-out slots for this new variable.
|
||||
skvm::Val initialValue = fBuilder->splat(0.0f).id;
|
||||
fSlots.insert(fSlots.end(), nslots, Slot{initialValue});
|
||||
fVariableMap[&v] = slot;
|
||||
return slot;
|
||||
}
|
||||
@ -1603,8 +1660,10 @@ void SkVMGenerator::writeForStatement(const ForStatement& f) {
|
||||
skvm::I32 oldLoopMask = fLoopMask,
|
||||
oldContinueMask = fContinueMask;
|
||||
|
||||
const Type::NumberKind indexKind = base_number_kind(loop.fIndex->type());
|
||||
|
||||
for (int i = 0; i < loop.fCount; ++i) {
|
||||
this->writeToSlot(indexSlot, (fSlots[indexSlot].kind == Type::NumberKind::kFloat)
|
||||
this->writeToSlot(indexSlot, (indexKind == Type::NumberKind::kFloat)
|
||||
? fBuilder->splat(static_cast<float>(val)).id
|
||||
: fBuilder->splat(static_cast<int>(val)).id);
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
class SkWStream;
|
||||
|
||||
namespace SkSL {
|
||||
|
||||
class FunctionDefinition;
|
||||
@ -24,8 +26,23 @@ using SampleShaderFn = std::function<skvm::Color(int, skvm::Coord)>;
|
||||
using SampleColorFilterFn = std::function<skvm::Color(int, skvm::Color)>;
|
||||
using SampleBlenderFn = std::function<skvm::Color(int, skvm::Color, skvm::Color)>;
|
||||
|
||||
struct SkVMSlotInfo {
|
||||
/** The full name of this variable (without component): (e.g. `myArray[3].myStruct.myVector`) */
|
||||
std::string name;
|
||||
/** The dimensions of this variable: 1x1 is a scalar, Nx1 is a vector, NxM is a matrix. */
|
||||
uint8_t columns = 1, rows = 1;
|
||||
/** Which component of the variable is this slot? (e.g. `vec4.z` is component 2) */
|
||||
uint8_t componentIndex = 0;
|
||||
/** What kind of numbers belong in this slot? */
|
||||
SkSL::Type::NumberKind numberKind = SkSL::Type::NumberKind::kNonnumeric;
|
||||
/** Where is this variable located in the program? */
|
||||
int line;
|
||||
};
|
||||
|
||||
struct SkVMDebugInfo {
|
||||
// TODO(skia:12614): add debug information here
|
||||
void dump(SkWStream* o) const;
|
||||
|
||||
std::vector<SkVMSlotInfo> fSlotInfo;
|
||||
};
|
||||
|
||||
// Convert 'function' to skvm instructions in 'builder', for use by blends, shaders, & color filters
|
||||
|
@ -1,29 +1,204 @@
|
||||
13 registers, 27 instructions:
|
||||
0 r0 = uniform32 ptr0 4
|
||||
1 r1 = uniform32 ptr0 14
|
||||
2 r2 = uniform32 ptr0 18
|
||||
3 r3 = uniform32 ptr0 1C
|
||||
4 r4 = uniform32 ptr0 20
|
||||
5 r5 = uniform32 ptr0 24
|
||||
6 r6 = uniform32 ptr0 2C
|
||||
7 r7 = uniform32 ptr0 30
|
||||
8 r8 = uniform32 ptr0 38
|
||||
9 r9 = uniform32 ptr0 48
|
||||
10 r10 = uniform32 ptr0 54
|
||||
11 r11 = uniform32 ptr0 64
|
||||
12 r12 = splat 0 (0)
|
||||
13 r3 = add_f32 r4 r3
|
||||
14 r2 = add_f32 r3 r2
|
||||
15 r1 = add_f32 r2 r1
|
||||
16 r5 = mul_f32 r5 r5
|
||||
17 r6 = mul_f32 r5 r6
|
||||
18 r7 = mul_f32 r6 r7
|
||||
19 r8 = sub_f32 r12 r8
|
||||
20 r9 = sub_f32 r8 r9
|
||||
21 r10 = sub_f32 r9 r10
|
||||
22 r11 = sub_f32 r10 r11
|
||||
$0 = u1[0] (float, L3)
|
||||
$1 = u1[1] (float, L3)
|
||||
$2 = u1[2] (float, L3)
|
||||
$3 = u1[3] (float, L3)
|
||||
$4 = u2[0] (float, L8)
|
||||
$5 = u2[1] (float, L8)
|
||||
$6 = u2[2] (float, L8)
|
||||
$7 = u2[3] (float, L8)
|
||||
$8 = u3[0] (float, L17)
|
||||
$9 = u3[1] (float, L17)
|
||||
$10 = u3[2] (float, L17)
|
||||
$11 = u3[3] (float, L17)
|
||||
$12 = u4[0] (float, L26)
|
||||
$13 = u4[1] (float, L26)
|
||||
$14 = u4[2] (float, L26)
|
||||
$15 = u4[3] (float, L26)
|
||||
$16 = u4[4] (float, L26)
|
||||
$17 = u4[5] (float, L26)
|
||||
$18 = u4[6] (float, L26)
|
||||
$19 = u4[7] (float, L26)
|
||||
$20 = u4[8] (float, L26)
|
||||
$21 = u4[9] (float, L26)
|
||||
$22 = u4[10] (float, L26)
|
||||
$23 = u4[11] (float, L26)
|
||||
$24 = u4[12] (float, L26)
|
||||
$25 = u4[13] (float, L26)
|
||||
$26 = u4[14] (float, L26)
|
||||
$27 = u4[15] (float, L26)
|
||||
$28 = xy (float2 : slot 1/2, L37)
|
||||
$29 = xy (float2 : slot 2/2, L37)
|
||||
$30 = sum (float, L10)
|
||||
$31 = i (int, L11)
|
||||
$32 = prod (float, L19)
|
||||
$33 = i (int, L20)
|
||||
$34 = sum (float, L28)
|
||||
$35 = f (float, L29)
|
||||
|
||||
52 registers, 165 instructions:
|
||||
0 r0 = uniform32 ptr0 0
|
||||
1 r1 = uniform32 ptr0 4
|
||||
2 r2 = uniform32 ptr0 8
|
||||
3 r3 = uniform32 ptr0 C
|
||||
4 r4 = uniform32 ptr0 10
|
||||
5 r5 = uniform32 ptr0 14
|
||||
6 r6 = uniform32 ptr0 18
|
||||
7 r7 = uniform32 ptr0 1C
|
||||
8 r8 = uniform32 ptr0 20
|
||||
9 r9 = uniform32 ptr0 24
|
||||
10 r10 = uniform32 ptr0 28
|
||||
11 r11 = uniform32 ptr0 2C
|
||||
12 r12 = uniform32 ptr0 30
|
||||
13 r13 = uniform32 ptr0 34
|
||||
14 r14 = uniform32 ptr0 38
|
||||
15 r15 = uniform32 ptr0 3C
|
||||
16 r16 = uniform32 ptr0 40
|
||||
17 r17 = uniform32 ptr0 44
|
||||
18 r18 = uniform32 ptr0 48
|
||||
19 r19 = uniform32 ptr0 4C
|
||||
20 r20 = uniform32 ptr0 50
|
||||
21 r21 = uniform32 ptr0 54
|
||||
22 r22 = uniform32 ptr0 58
|
||||
23 r23 = uniform32 ptr0 5C
|
||||
24 r24 = uniform32 ptr0 60
|
||||
25 r25 = uniform32 ptr0 64
|
||||
26 r26 = uniform32 ptr0 68
|
||||
27 r27 = uniform32 ptr0 6C
|
||||
28 r28 = uniform32 ptr0 70
|
||||
29 r29 = splat 0 (0)
|
||||
30 r30 = splat FFFFFFFF (nan)
|
||||
31 r31 = splat 3 (4.2038954e-45)
|
||||
32 r32 = splat 2 (2.8025969e-45)
|
||||
33 r33 = add_f32 r8 r7
|
||||
34 r34 = splat 1 (1.4012985e-45)
|
||||
35 r35 = add_f32 r33 r6
|
||||
36 r36 = add_f32 r35 r5
|
||||
37 r37 = splat 3F800000 (1)
|
||||
38 r38 = mul_f32 r9 r9
|
||||
39 r39 = mul_f32 r38 r11
|
||||
40 r40 = mul_f32 r39 r12
|
||||
41 r41 = splat C0133333 (-2.3)
|
||||
42 r42 = splat 3FB33334 (1.4000001)
|
||||
43 r43 = sub_f32 r29 r14
|
||||
44 r44 = splat 40A33334 (5.1000004)
|
||||
45 r45 = sub_f32 r43 r18
|
||||
46 r46 = splat 410CCCCD (8.8000002)
|
||||
47 r47 = sub_f32 r45 r21
|
||||
48 r48 = splat 41480000 (12.5)
|
||||
49 r49 = sub_f32 r47 r25
|
||||
50 r50 = splat 4181999A (16.200001)
|
||||
loop:
|
||||
23 store32 ptr1 r0
|
||||
24 store32 ptr2 r1
|
||||
25 store32 ptr3 r7
|
||||
26 store32 ptr4 r11
|
||||
51 r51 = index
|
||||
52 trace_var r30 $0 = r1 (F32)
|
||||
53 trace_var r30 $1 = r2 (F32)
|
||||
54 trace_var r30 $2 = r3 (F32)
|
||||
55 trace_var r30 $3 = r4 (F32)
|
||||
56 trace_var r30 $4 = r5 (F32)
|
||||
57 trace_var r30 $5 = r6 (F32)
|
||||
58 trace_var r30 $6 = r7 (F32)
|
||||
59 trace_var r30 $7 = r8 (F32)
|
||||
60 trace_var r30 $8 = r9 (F32)
|
||||
61 trace_var r30 $9 = r10 (F32)
|
||||
62 trace_var r30 $10 = r11 (F32)
|
||||
63 trace_var r30 $11 = r12 (F32)
|
||||
64 trace_var r30 $12 = r13 (F32)
|
||||
65 trace_var r30 $13 = r14 (F32)
|
||||
66 trace_var r30 $14 = r15 (F32)
|
||||
67 trace_var r30 $15 = r16 (F32)
|
||||
68 trace_var r30 $16 = r17 (F32)
|
||||
69 trace_var r30 $17 = r18 (F32)
|
||||
70 trace_var r30 $18 = r19 (F32)
|
||||
71 trace_var r30 $19 = r20 (F32)
|
||||
72 trace_var r30 $20 = r21 (F32)
|
||||
73 trace_var r30 $21 = r22 (F32)
|
||||
74 trace_var r30 $22 = r23 (F32)
|
||||
75 trace_var r30 $23 = r24 (F32)
|
||||
76 trace_var r30 $24 = r25 (F32)
|
||||
77 trace_var r30 $25 = r26 (F32)
|
||||
78 trace_var r30 $26 = r27 (F32)
|
||||
79 trace_var r30 $27 = r28 (F32)
|
||||
80 trace_call r30 L37 (enter)
|
||||
81 trace_var r30 $28 = r51 (F32)
|
||||
82 trace_var r30 $29 = r0 (F32)
|
||||
83 trace_line r30 L38
|
||||
84 trace_call r30 L4 (enter)
|
||||
85 trace_line r30 L5
|
||||
86 trace_call r30 L4 (exit)
|
||||
87 trace_call r30 L9 (enter)
|
||||
88 trace_line r30 L10
|
||||
89 trace_line r30 L11
|
||||
90 trace_var r30 $31 = r31 (I32)
|
||||
91 trace_line r30 L12
|
||||
92 trace_var r30 $30 = r8 (F32)
|
||||
93 trace_line r30 L11
|
||||
94 trace_var r30 $31 = r32 (I32)
|
||||
95 trace_line r30 L12
|
||||
96 trace_var r30 $30 = r33 (F32)
|
||||
97 trace_line r30 L11
|
||||
98 trace_var r30 $31 = r34 (I32)
|
||||
99 trace_line r30 L12
|
||||
100 trace_var r30 $30 = r35 (F32)
|
||||
101 trace_line r30 L11
|
||||
102 trace_var r30 $31 = r29 (I32)
|
||||
103 trace_line r30 L12
|
||||
104 trace_var r30 $30 = r36 (F32)
|
||||
105 trace_line r30 L11
|
||||
106 trace_line r30 L14
|
||||
107 trace_call r30 L9 (exit)
|
||||
108 trace_call r30 L18 (enter)
|
||||
109 trace_line r30 L19
|
||||
110 trace_var r30 $32 = r37 (F32)
|
||||
111 trace_line r30 L20
|
||||
112 trace_line r30 L21
|
||||
113 trace_var r30 $32 = r9 (F32)
|
||||
114 trace_line r30 L20
|
||||
115 trace_var r30 $33 = r34 (I32)
|
||||
116 trace_line r30 L21
|
||||
117 trace_var r30 $32 = r38 (F32)
|
||||
118 trace_line r30 L20
|
||||
119 trace_var r30 $33 = r32 (I32)
|
||||
120 trace_line r30 L21
|
||||
121 trace_var r30 $32 = r39 (F32)
|
||||
122 trace_line r30 L20
|
||||
123 trace_var r30 $33 = r31 (I32)
|
||||
124 trace_line r30 L21
|
||||
125 trace_var r30 $32 = r40 (F32)
|
||||
126 trace_line r30 L20
|
||||
127 trace_line r30 L23
|
||||
128 trace_call r30 L18 (exit)
|
||||
129 trace_call r30 L27 (enter)
|
||||
130 trace_line r30 L28
|
||||
131 trace_line r30 L29
|
||||
132 trace_var r30 $35 = r41 (F32)
|
||||
133 trace_line r30 L30
|
||||
134 trace_line r30 L29
|
||||
135 trace_var r30 $35 = r42 (F32)
|
||||
136 trace_line r30 L30
|
||||
137 trace_line r30 L31
|
||||
138 trace_var r30 $34 = r43 (F32)
|
||||
139 trace_line r30 L29
|
||||
140 trace_var r30 $35 = r44 (F32)
|
||||
141 trace_line r30 L30
|
||||
142 trace_line r30 L31
|
||||
143 trace_var r30 $34 = r45 (F32)
|
||||
144 trace_line r30 L29
|
||||
145 trace_var r30 $35 = r46 (F32)
|
||||
146 trace_line r30 L30
|
||||
147 trace_line r30 L31
|
||||
148 trace_var r30 $34 = r47 (F32)
|
||||
149 trace_line r30 L29
|
||||
150 trace_var r30 $35 = r48 (F32)
|
||||
151 trace_line r30 L30
|
||||
152 trace_line r30 L31
|
||||
153 trace_var r30 $34 = r49 (F32)
|
||||
154 trace_line r30 L29
|
||||
155 trace_var r30 $35 = r50 (F32)
|
||||
156 trace_line r30 L30
|
||||
157 trace_line r30 L29
|
||||
158 trace_line r30 L34
|
||||
159 trace_call r30 L27 (exit)
|
||||
160 trace_call r30 L37 (exit)
|
||||
161 store32 ptr1 r1
|
||||
162 store32 ptr2 r36
|
||||
163 store32 ptr3 r40
|
||||
164 store32 ptr4 r49
|
||||
|
@ -1,26 +1,46 @@
|
||||
uniform float u1[4];
|
||||
float index_by_literal_0();
|
||||
uniform float u2[4];
|
||||
float index_by_loop_0();
|
||||
uniform float u3[4];
|
||||
float index_by_complex_loop_0();
|
||||
uniform float u4[16];
|
||||
float4 main(float2 xy)
|
||||
float index_out_of_bounds_checked_0();
|
||||
float index_by_literal_0()
|
||||
{
|
||||
float _0_sum = 0.0;
|
||||
for (int _1_i = 3;_1_i >= 0; --_1_i)
|
||||
return u1[0];
|
||||
}
|
||||
float index_by_loop_0()
|
||||
{
|
||||
float sum = 0.0;
|
||||
for (int i = 3;i >= 0; --i)
|
||||
{
|
||||
_0_sum += u2[_1_i];
|
||||
sum += u2[i];
|
||||
}
|
||||
float _2_prod = 1.0;
|
||||
for (int _3_i = 0;_3_i < 4; ++_3_i)
|
||||
return sum;
|
||||
}
|
||||
float index_by_complex_loop_0()
|
||||
{
|
||||
float prod = 1.0;
|
||||
for (int i = 0;i < 4; ++i)
|
||||
{
|
||||
_2_prod *= u3[_3_i < 2 ? 0 : _3_i];
|
||||
prod *= u3[i < 2 ? 0 : i];
|
||||
}
|
||||
float _4_sum = 0.0;
|
||||
for (float _5_f = -2.2999999523162842;_5_f < 17.0; _5_f += 3.7000000476837158)
|
||||
return prod;
|
||||
}
|
||||
float index_out_of_bounds_checked_0()
|
||||
{
|
||||
float sum = 0.0;
|
||||
for (float f = -2.2999999523162842;f < 17.0; f += 3.7000000476837158)
|
||||
{
|
||||
if (_5_f > 0.0 && _5_f < 16.0)
|
||||
if (f > 0.0 && f < 16.0)
|
||||
{
|
||||
_4_sum -= u4[int(_5_f)];
|
||||
sum -= u4[int(f)];
|
||||
}
|
||||
}
|
||||
return half4(float4(u1[0], _0_sum, _2_prod, _4_sum));
|
||||
return sum;
|
||||
}
|
||||
float4 main(float2 xy)
|
||||
{
|
||||
return half4(float4(index_by_literal_0(), index_by_loop_0(), index_by_complex_loop_0(), index_out_of_bounds_checked_0()));
|
||||
}
|
||||
|
@ -1,3 +1,58 @@
|
||||
$0 = colorRed (float4 : slot 1/4, L3)
|
||||
$1 = colorRed (float4 : slot 2/4, L3)
|
||||
$2 = colorRed (float4 : slot 3/4, L3)
|
||||
$3 = colorRed (float4 : slot 4/4, L3)
|
||||
$4 = colorGreen (float4 : slot 1/4, L3)
|
||||
$5 = colorGreen (float4 : slot 2/4, L3)
|
||||
$6 = colorGreen (float4 : slot 3/4, L3)
|
||||
$7 = colorGreen (float4 : slot 4/4, L3)
|
||||
$8 = kZero (float, L6)
|
||||
$9 = kTen (float, L15)
|
||||
$10 = pos (float2 : slot 1/2, L115)
|
||||
$11 = pos (float2 : slot 2/2, L115)
|
||||
$12 = five (float, L116)
|
||||
$13 = five (float, L7)
|
||||
$14 = i (float, L8)
|
||||
$15 = five (float, L16)
|
||||
$16 = sum (float, L17)
|
||||
$17 = i (float, L18)
|
||||
$18 = five (float, L26)
|
||||
$19 = sum (float, L27)
|
||||
$20 = kOne (float, L28)
|
||||
$21 = i (float, L29)
|
||||
$22 = sum (float, L38)
|
||||
$23 = i (float, L39)
|
||||
$24 = result (float4 : slot 1/4, L50)
|
||||
$25 = result (float4 : slot 2/4, L50)
|
||||
$26 = result (float4 : slot 3/4, L50)
|
||||
$27 = result (float4 : slot 4/4, L50)
|
||||
$28 = i (float, L51)
|
||||
$29 = result (float4 : slot 1/4, L62)
|
||||
$30 = result (float4 : slot 2/4, L62)
|
||||
$31 = result (float4 : slot 3/4, L62)
|
||||
$32 = result (float4 : slot 4/4, L62)
|
||||
$33 = i (float, L63)
|
||||
$34 = result (float4 : slot 1/4, L74)
|
||||
$35 = result (float4 : slot 2/4, L74)
|
||||
$36 = result (float4 : slot 3/4, L74)
|
||||
$37 = result (float4 : slot 4/4, L74)
|
||||
$38 = i (float, L75)
|
||||
$39 = result (float4 : slot 1/4, L86)
|
||||
$40 = result (float4 : slot 2/4, L86)
|
||||
$41 = result (float4 : slot 3/4, L86)
|
||||
$42 = result (float4 : slot 4/4, L86)
|
||||
$43 = i (float, L87)
|
||||
$44 = result (float4 : slot 1/4, L108)
|
||||
$45 = result (float4 : slot 2/4, L108)
|
||||
$46 = result (float4 : slot 3/4, L108)
|
||||
$47 = result (float4 : slot 4/4, L108)
|
||||
$48 = i (float, L109)
|
||||
$49 = result (float4 : slot 1/4, L97)
|
||||
$50 = result (float4 : slot 2/4, L97)
|
||||
$51 = result (float4 : slot 3/4, L97)
|
||||
$52 = result (float4 : slot 4/4, L97)
|
||||
$53 = i (float, L98)
|
||||
|
||||
38 registers, 709 instructions:
|
||||
0 r0 = uniform32 ptr0 0
|
||||
1 r1 = uniform32 ptr0 4
|
||||
|
@ -1,3 +1,56 @@
|
||||
$0 = colorRed (float4 : slot 1/4, L3)
|
||||
$1 = colorRed (float4 : slot 2/4, L3)
|
||||
$2 = colorRed (float4 : slot 3/4, L3)
|
||||
$3 = colorRed (float4 : slot 4/4, L3)
|
||||
$4 = colorGreen (float4 : slot 1/4, L3)
|
||||
$5 = colorGreen (float4 : slot 2/4, L3)
|
||||
$6 = colorGreen (float4 : slot 3/4, L3)
|
||||
$7 = colorGreen (float4 : slot 4/4, L3)
|
||||
$8 = kZero (int, L6)
|
||||
$9 = kTen (int, L15)
|
||||
$10 = pos (float2 : slot 1/2, L106)
|
||||
$11 = pos (float2 : slot 2/2, L106)
|
||||
$12 = five (int, L107)
|
||||
$13 = five (int, L7)
|
||||
$14 = i (int, L8)
|
||||
$15 = five (int, L16)
|
||||
$16 = sum (int, L17)
|
||||
$17 = i (int, L18)
|
||||
$18 = five (int, L26)
|
||||
$19 = sum (int, L27)
|
||||
$20 = kOne (int, L28)
|
||||
$21 = i (int, L29)
|
||||
$22 = result (int4 : slot 1/4, L41)
|
||||
$23 = result (int4 : slot 2/4, L41)
|
||||
$24 = result (int4 : slot 3/4, L41)
|
||||
$25 = result (int4 : slot 4/4, L41)
|
||||
$26 = i (int, L42)
|
||||
$27 = result (int4 : slot 1/4, L53)
|
||||
$28 = result (int4 : slot 2/4, L53)
|
||||
$29 = result (int4 : slot 3/4, L53)
|
||||
$30 = result (int4 : slot 4/4, L53)
|
||||
$31 = i (int, L54)
|
||||
$32 = result (int4 : slot 1/4, L65)
|
||||
$33 = result (int4 : slot 2/4, L65)
|
||||
$34 = result (int4 : slot 3/4, L65)
|
||||
$35 = result (int4 : slot 4/4, L65)
|
||||
$36 = i (int, L66)
|
||||
$37 = result (int4 : slot 1/4, L77)
|
||||
$38 = result (int4 : slot 2/4, L77)
|
||||
$39 = result (int4 : slot 3/4, L77)
|
||||
$40 = result (int4 : slot 4/4, L77)
|
||||
$41 = i (int, L78)
|
||||
$42 = result (int4 : slot 1/4, L99)
|
||||
$43 = result (int4 : slot 2/4, L99)
|
||||
$44 = result (int4 : slot 3/4, L99)
|
||||
$45 = result (int4 : slot 4/4, L99)
|
||||
$46 = i (int, L100)
|
||||
$47 = result (int4 : slot 1/4, L88)
|
||||
$48 = result (int4 : slot 2/4, L88)
|
||||
$49 = result (int4 : slot 3/4, L88)
|
||||
$50 = result (int4 : slot 4/4, L88)
|
||||
$51 = i (int, L89)
|
||||
|
||||
30 registers, 663 instructions:
|
||||
0 r0 = uniform32 ptr0 0
|
||||
1 r1 = uniform32 ptr0 4
|
||||
|
@ -1,10 +1,312 @@
|
||||
4 registers, 8 instructions:
|
||||
0 r0 = uniform32 ptr0 4
|
||||
1 r1 = uniform32 ptr0 8
|
||||
2 r2 = uniform32 ptr0 C
|
||||
3 r3 = uniform32 ptr0 10
|
||||
$0 = colorGreen (float4 : slot 1/4, L3)
|
||||
$1 = colorGreen (float4 : slot 2/4, L3)
|
||||
$2 = colorGreen (float4 : slot 3/4, L3)
|
||||
$3 = colorGreen (float4 : slot 4/4, L3)
|
||||
$4 = colorRed (float4 : slot 1/4, L3)
|
||||
$5 = colorRed (float4 : slot 2/4, L3)
|
||||
$6 = colorRed (float4 : slot 3/4, L3)
|
||||
$7 = colorRed (float4 : slot 4/4, L3)
|
||||
$8 = coords (float2 : slot 1/2, L57)
|
||||
$9 = coords (float2 : slot 2/2, L57)
|
||||
$10 = zero (float4 : slot 1/4, L58)
|
||||
$11 = zero (float4 : slot 2/4, L58)
|
||||
$12 = zero (float4 : slot 3/4, L58)
|
||||
$13 = zero (float4 : slot 4/4, L58)
|
||||
$14 = one (float4 : slot 1/4, L59)
|
||||
$15 = one (float4 : slot 2/4, L59)
|
||||
$16 = one (float4 : slot 3/4, L59)
|
||||
$17 = one (float4 : slot 4/4, L59)
|
||||
$18 = green (float4 : slot 1/4, L60)
|
||||
$19 = green (float4 : slot 2/4, L60)
|
||||
$20 = green (float4 : slot 3/4, L60)
|
||||
$21 = green (float4 : slot 4/4, L60)
|
||||
$22 = red (float4 : slot 1/4, L63)
|
||||
$23 = red (float4 : slot 2/4, L63)
|
||||
$24 = red (float4 : slot 3/4, L63)
|
||||
$25 = red (float4 : slot 4/4, L63)
|
||||
$26 = mp (float, L6)
|
||||
$27 = hp (float, L7)
|
||||
$28 = ihp (int, L8)
|
||||
$29 = imp (int, L9)
|
||||
$30 = mp2 (float2 : slot 1/2, L15)
|
||||
$31 = mp2 (float2 : slot 2/2, L15)
|
||||
$32 = hp2 (float2 : slot 1/2, L16)
|
||||
$33 = hp2 (float2 : slot 2/2, L16)
|
||||
$34 = mp3 (float3 : slot 1/3, L17)
|
||||
$35 = mp3 (float3 : slot 2/3, L17)
|
||||
$36 = mp3 (float3 : slot 3/3, L17)
|
||||
$37 = hp3 (float3 : slot 1/3, L18)
|
||||
$38 = hp3 (float3 : slot 2/3, L18)
|
||||
$39 = hp3 (float3 : slot 3/3, L18)
|
||||
$40 = mp4 (float4 : slot 1/4, L19)
|
||||
$41 = mp4 (float4 : slot 2/4, L19)
|
||||
$42 = mp4 (float4 : slot 3/4, L19)
|
||||
$43 = mp4 (float4 : slot 4/4, L19)
|
||||
$44 = hp4 (float4 : slot 1/4, L20)
|
||||
$45 = hp4 (float4 : slot 2/4, L20)
|
||||
$46 = hp4 (float4 : slot 3/4, L20)
|
||||
$47 = hp4 (float4 : slot 4/4, L20)
|
||||
$48 = ihp2 (int2 : slot 1/2, L22)
|
||||
$49 = ihp2 (int2 : slot 2/2, L22)
|
||||
$50 = imp2 (int2 : slot 1/2, L23)
|
||||
$51 = imp2 (int2 : slot 2/2, L23)
|
||||
$52 = ihp3 (int3 : slot 1/3, L24)
|
||||
$53 = ihp3 (int3 : slot 2/3, L24)
|
||||
$54 = ihp3 (int3 : slot 3/3, L24)
|
||||
$55 = imp3 (int3 : slot 1/3, L25)
|
||||
$56 = imp3 (int3 : slot 2/3, L25)
|
||||
$57 = imp3 (int3 : slot 3/3, L25)
|
||||
$58 = ihp4 (int4 : slot 1/4, L26)
|
||||
$59 = ihp4 (int4 : slot 2/4, L26)
|
||||
$60 = ihp4 (int4 : slot 3/4, L26)
|
||||
$61 = ihp4 (int4 : slot 4/4, L26)
|
||||
$62 = imp4 (int4 : slot 1/4, L27)
|
||||
$63 = imp4 (int4 : slot 2/4, L27)
|
||||
$64 = imp4 (int4 : slot 3/4, L27)
|
||||
$65 = imp4 (int4 : slot 4/4, L27)
|
||||
$66 = mp2 (float2x2 : slot 1/4, L34)
|
||||
$67 = mp2 (float2x2 : slot 2/4, L34)
|
||||
$68 = mp2 (float2x2 : slot 3/4, L34)
|
||||
$69 = mp2 (float2x2 : slot 4/4, L34)
|
||||
$70 = hp2 (float2x2 : slot 1/4, L35)
|
||||
$71 = hp2 (float2x2 : slot 2/4, L35)
|
||||
$72 = hp2 (float2x2 : slot 3/4, L35)
|
||||
$73 = hp2 (float2x2 : slot 4/4, L35)
|
||||
$74 = mp3 (float3x3 : slot 1/9, L36)
|
||||
$75 = mp3 (float3x3 : slot 2/9, L36)
|
||||
$76 = mp3 (float3x3 : slot 3/9, L36)
|
||||
$77 = mp3 (float3x3 : slot 4/9, L36)
|
||||
$78 = mp3 (float3x3 : slot 5/9, L36)
|
||||
$79 = mp3 (float3x3 : slot 6/9, L36)
|
||||
$80 = mp3 (float3x3 : slot 7/9, L36)
|
||||
$81 = mp3 (float3x3 : slot 8/9, L36)
|
||||
$82 = mp3 (float3x3 : slot 9/9, L36)
|
||||
$83 = hp3 (float3x3 : slot 1/9, L37)
|
||||
$84 = hp3 (float3x3 : slot 2/9, L37)
|
||||
$85 = hp3 (float3x3 : slot 3/9, L37)
|
||||
$86 = hp3 (float3x3 : slot 4/9, L37)
|
||||
$87 = hp3 (float3x3 : slot 5/9, L37)
|
||||
$88 = hp3 (float3x3 : slot 6/9, L37)
|
||||
$89 = hp3 (float3x3 : slot 7/9, L37)
|
||||
$90 = hp3 (float3x3 : slot 8/9, L37)
|
||||
$91 = hp3 (float3x3 : slot 9/9, L37)
|
||||
$92 = mp4 (float4x4 : slot 1/16, L38)
|
||||
$93 = mp4 (float4x4 : slot 2/16, L38)
|
||||
$94 = mp4 (float4x4 : slot 3/16, L38)
|
||||
$95 = mp4 (float4x4 : slot 4/16, L38)
|
||||
$96 = mp4 (float4x4 : slot 5/16, L38)
|
||||
$97 = mp4 (float4x4 : slot 6/16, L38)
|
||||
$98 = mp4 (float4x4 : slot 7/16, L38)
|
||||
$99 = mp4 (float4x4 : slot 8/16, L38)
|
||||
$100 = mp4 (float4x4 : slot 9/16, L38)
|
||||
$101 = mp4 (float4x4 : slot 10/16, L38)
|
||||
$102 = mp4 (float4x4 : slot 11/16, L38)
|
||||
$103 = mp4 (float4x4 : slot 12/16, L38)
|
||||
$104 = mp4 (float4x4 : slot 13/16, L38)
|
||||
$105 = mp4 (float4x4 : slot 14/16, L38)
|
||||
$106 = mp4 (float4x4 : slot 15/16, L38)
|
||||
$107 = mp4 (float4x4 : slot 16/16, L38)
|
||||
$108 = hp4 (float4x4 : slot 1/16, L39)
|
||||
$109 = hp4 (float4x4 : slot 2/16, L39)
|
||||
$110 = hp4 (float4x4 : slot 3/16, L39)
|
||||
$111 = hp4 (float4x4 : slot 4/16, L39)
|
||||
$112 = hp4 (float4x4 : slot 5/16, L39)
|
||||
$113 = hp4 (float4x4 : slot 6/16, L39)
|
||||
$114 = hp4 (float4x4 : slot 7/16, L39)
|
||||
$115 = hp4 (float4x4 : slot 8/16, L39)
|
||||
$116 = hp4 (float4x4 : slot 9/16, L39)
|
||||
$117 = hp4 (float4x4 : slot 10/16, L39)
|
||||
$118 = hp4 (float4x4 : slot 11/16, L39)
|
||||
$119 = hp4 (float4x4 : slot 12/16, L39)
|
||||
$120 = hp4 (float4x4 : slot 13/16, L39)
|
||||
$121 = hp4 (float4x4 : slot 14/16, L39)
|
||||
$122 = hp4 (float4x4 : slot 15/16, L39)
|
||||
$123 = hp4 (float4x4 : slot 16/16, L39)
|
||||
$124 = mf[0] (float, L45)
|
||||
$125 = hf[0] (float, L46)
|
||||
$126 = mv[0] (float2 : slot 1/2, L47)
|
||||
$127 = mv[0] (float2 : slot 2/2, L47)
|
||||
$128 = mv[1] (float2 : slot 1/2, L47)
|
||||
$129 = mv[1] (float2 : slot 2/2, L47)
|
||||
$130 = hv[0] (float2 : slot 1/2, L48)
|
||||
$131 = hv[0] (float2 : slot 2/2, L48)
|
||||
$132 = hv[1] (float2 : slot 1/2, L48)
|
||||
$133 = hv[1] (float2 : slot 2/2, L48)
|
||||
$134 = value (float, L53)
|
||||
$135 = value (float, L54)
|
||||
$136 = value (float, L55)
|
||||
|
||||
19 registers, 172 instructions:
|
||||
0 r0 = uniform32 ptr0 0
|
||||
1 r1 = uniform32 ptr0 4
|
||||
2 r2 = uniform32 ptr0 8
|
||||
3 r3 = uniform32 ptr0 C
|
||||
4 r4 = uniform32 ptr0 10
|
||||
5 r5 = uniform32 ptr0 14
|
||||
6 r6 = uniform32 ptr0 18
|
||||
7 r7 = uniform32 ptr0 1C
|
||||
8 r8 = uniform32 ptr0 20
|
||||
9 r9 = splat FFFFFFFF (nan)
|
||||
10 r10 = splat 3F800000 (1)
|
||||
11 r11 = splat 3F000000 (0.5)
|
||||
12 r12 = splat 2 (2.8025969e-45)
|
||||
13 r13 = splat 40000000 (2)
|
||||
14 r14 = splat 40400000 (3)
|
||||
15 r15 = splat 40800000 (4)
|
||||
16 r16 = splat 3 (4.2038954e-45)
|
||||
17 r17 = splat 4 (5.6051939e-45)
|
||||
loop:
|
||||
4 store32 ptr1 r0
|
||||
5 store32 ptr2 r1
|
||||
6 store32 ptr3 r2
|
||||
7 store32 ptr4 r3
|
||||
18 r18 = index
|
||||
19 trace_var r9 $0 = r1 (F32)
|
||||
20 trace_var r9 $1 = r2 (F32)
|
||||
21 trace_var r9 $2 = r3 (F32)
|
||||
22 trace_var r9 $3 = r4 (F32)
|
||||
23 trace_var r9 $4 = r5 (F32)
|
||||
24 trace_var r9 $5 = r6 (F32)
|
||||
25 trace_var r9 $6 = r7 (F32)
|
||||
26 trace_var r9 $7 = r8 (F32)
|
||||
27 trace_call r9 L57 (enter)
|
||||
28 trace_var r9 $8 = r18 (F32)
|
||||
29 trace_var r9 $9 = r0 (F32)
|
||||
30 trace_line r9 L58
|
||||
31 trace_line r9 L59
|
||||
32 trace_var r9 $14 = r10 (F32)
|
||||
33 trace_var r9 $15 = r10 (F32)
|
||||
34 trace_var r9 $16 = r10 (F32)
|
||||
35 trace_var r9 $17 = r10 (F32)
|
||||
36 trace_line r9 L60
|
||||
37 trace_var r9 $18 = r1 (F32)
|
||||
38 trace_var r9 $19 = r2 (F32)
|
||||
39 trace_var r9 $20 = r3 (F32)
|
||||
40 trace_var r9 $21 = r4 (F32)
|
||||
41 trace_line r9 L61
|
||||
42 trace_line r9 L63
|
||||
43 trace_var r9 $22 = r5 (F32)
|
||||
44 trace_var r9 $23 = r6 (F32)
|
||||
45 trace_var r9 $24 = r7 (F32)
|
||||
46 trace_var r9 $25 = r8 (F32)
|
||||
47 trace_line r9 L64
|
||||
48 trace_line r9 L66
|
||||
49 trace_call r9 L5 (enter)
|
||||
50 trace_line r9 L6
|
||||
51 trace_var r9 $26 = r11 (F32)
|
||||
52 trace_line r9 L7
|
||||
53 trace_var r9 $27 = r11 (F32)
|
||||
54 trace_line r9 L8
|
||||
55 trace_var r9 $28 = r12 (I32)
|
||||
56 trace_line r9 L9
|
||||
57 trace_var r9 $29 = r12 (I32)
|
||||
58 trace_line r9 L11
|
||||
59 trace_call r9 L5 (exit)
|
||||
60 trace_call r9 L14 (enter)
|
||||
61 trace_line r9 L15
|
||||
62 trace_var r9 $30 = r13 (F32)
|
||||
63 trace_var r9 $31 = r13 (F32)
|
||||
64 trace_line r9 L16
|
||||
65 trace_var r9 $32 = r13 (F32)
|
||||
66 trace_var r9 $33 = r13 (F32)
|
||||
67 trace_line r9 L17
|
||||
68 trace_var r9 $34 = r14 (F32)
|
||||
69 trace_var r9 $35 = r14 (F32)
|
||||
70 trace_var r9 $36 = r14 (F32)
|
||||
71 trace_line r9 L18
|
||||
72 trace_var r9 $37 = r14 (F32)
|
||||
73 trace_var r9 $38 = r14 (F32)
|
||||
74 trace_var r9 $39 = r14 (F32)
|
||||
75 trace_line r9 L19
|
||||
76 trace_var r9 $40 = r15 (F32)
|
||||
77 trace_var r9 $41 = r15 (F32)
|
||||
78 trace_var r9 $42 = r15 (F32)
|
||||
79 trace_var r9 $43 = r15 (F32)
|
||||
80 trace_line r9 L20
|
||||
81 trace_var r9 $44 = r15 (F32)
|
||||
82 trace_var r9 $45 = r15 (F32)
|
||||
83 trace_var r9 $46 = r15 (F32)
|
||||
84 trace_var r9 $47 = r15 (F32)
|
||||
85 trace_line r9 L22
|
||||
86 trace_var r9 $48 = r12 (I32)
|
||||
87 trace_var r9 $49 = r12 (I32)
|
||||
88 trace_line r9 L23
|
||||
89 trace_var r9 $50 = r12 (I32)
|
||||
90 trace_var r9 $51 = r12 (I32)
|
||||
91 trace_line r9 L24
|
||||
92 trace_var r9 $52 = r16 (I32)
|
||||
93 trace_var r9 $53 = r16 (I32)
|
||||
94 trace_var r9 $54 = r16 (I32)
|
||||
95 trace_line r9 L25
|
||||
96 trace_var r9 $55 = r16 (I32)
|
||||
97 trace_var r9 $56 = r16 (I32)
|
||||
98 trace_var r9 $57 = r16 (I32)
|
||||
99 trace_line r9 L26
|
||||
100 trace_var r9 $58 = r17 (I32)
|
||||
101 trace_var r9 $59 = r17 (I32)
|
||||
102 trace_var r9 $60 = r17 (I32)
|
||||
103 trace_var r9 $61 = r17 (I32)
|
||||
104 trace_line r9 L27
|
||||
105 trace_var r9 $62 = r17 (I32)
|
||||
106 trace_var r9 $63 = r17 (I32)
|
||||
107 trace_var r9 $64 = r17 (I32)
|
||||
108 trace_var r9 $65 = r17 (I32)
|
||||
109 trace_line r9 L29
|
||||
110 trace_call r9 L14 (exit)
|
||||
111 trace_call r9 L33 (enter)
|
||||
112 trace_line r9 L34
|
||||
113 trace_var r9 $66 = r13 (F32)
|
||||
114 trace_var r9 $69 = r13 (F32)
|
||||
115 trace_line r9 L35
|
||||
116 trace_var r9 $70 = r13 (F32)
|
||||
117 trace_var r9 $73 = r13 (F32)
|
||||
118 trace_line r9 L36
|
||||
119 trace_var r9 $74 = r14 (F32)
|
||||
120 trace_var r9 $78 = r14 (F32)
|
||||
121 trace_var r9 $82 = r14 (F32)
|
||||
122 trace_line r9 L37
|
||||
123 trace_var r9 $83 = r14 (F32)
|
||||
124 trace_var r9 $87 = r14 (F32)
|
||||
125 trace_var r9 $91 = r14 (F32)
|
||||
126 trace_line r9 L38
|
||||
127 trace_var r9 $92 = r15 (F32)
|
||||
128 trace_var r9 $97 = r15 (F32)
|
||||
129 trace_var r9 $102 = r15 (F32)
|
||||
130 trace_var r9 $107 = r15 (F32)
|
||||
131 trace_line r9 L39
|
||||
132 trace_var r9 $108 = r15 (F32)
|
||||
133 trace_var r9 $113 = r15 (F32)
|
||||
134 trace_var r9 $118 = r15 (F32)
|
||||
135 trace_var r9 $123 = r15 (F32)
|
||||
136 trace_line r9 L41
|
||||
137 trace_call r9 L33 (exit)
|
||||
138 trace_call r9 L44 (enter)
|
||||
139 trace_line r9 L45
|
||||
140 trace_var r9 $124 = r10 (F32)
|
||||
141 trace_line r9 L46
|
||||
142 trace_var r9 $125 = r10 (F32)
|
||||
143 trace_line r9 L47
|
||||
144 trace_var r9 $127 = r10 (F32)
|
||||
145 trace_line r9 L47
|
||||
146 trace_var r9 $128 = r13 (F32)
|
||||
147 trace_var r9 $129 = r14 (F32)
|
||||
148 trace_line r9 L48
|
||||
149 trace_var r9 $131 = r10 (F32)
|
||||
150 trace_line r9 L48
|
||||
151 trace_var r9 $132 = r13 (F32)
|
||||
152 trace_var r9 $133 = r14 (F32)
|
||||
153 trace_line r9 L50
|
||||
154 trace_call r9 L44 (exit)
|
||||
155 trace_call r9 L53 (enter)
|
||||
156 trace_var r9 $134 = r10 (F32)
|
||||
157 trace_line r9 L53
|
||||
158 trace_call r9 L53 (exit)
|
||||
159 trace_call r9 L54 (enter)
|
||||
160 trace_var r9 $135 = r13 (F32)
|
||||
161 trace_line r9 L54
|
||||
162 trace_call r9 L54 (exit)
|
||||
163 trace_call r9 L55 (enter)
|
||||
164 trace_var r9 $136 = r14 (F32)
|
||||
165 trace_line r9 L55
|
||||
166 trace_call r9 L55 (exit)
|
||||
167 trace_call r9 L57 (exit)
|
||||
168 store32 ptr1 r1
|
||||
169 store32 ptr2 r2
|
||||
170 store32 ptr3 r3
|
||||
171 store32 ptr4 r4
|
||||
|
@ -1,11 +1,20 @@
|
||||
uniform half4 colorGreen;
|
||||
uniform half4 colorRed;
|
||||
bool test_scalar_0();
|
||||
bool test_vector_0();
|
||||
bool test_matrix_0();
|
||||
bool test_array_0();
|
||||
bool highp_param_0(float value);
|
||||
bool mediump_param_0(half value);
|
||||
bool lowp_param_0(half value);
|
||||
bool test_scalar_0()
|
||||
{
|
||||
half mp = 0.5;
|
||||
float hp = float(mp);
|
||||
int ihp = 2;
|
||||
short imp = short(ihp);
|
||||
return float(mp) == hp && ihp == int(imp);
|
||||
}
|
||||
bool test_vector_0()
|
||||
{
|
||||
half2 mp2 = half2(2.0);
|
||||
@ -66,9 +75,5 @@ float4 main(float2 coords)
|
||||
green = half4(float4(green * one) + zero);
|
||||
float4 red = float4(colorRed);
|
||||
red = (red + zero) * float4(one);
|
||||
half _0_mp = 0.5;
|
||||
float _1_hp = float(_0_mp);
|
||||
int _2_ihp = 2;
|
||||
short _3_imp = short(_2_ihp);
|
||||
return half4(((((((float(_0_mp) == _1_hp && _2_ihp == int(_3_imp)) && test_vector_0()) && test_matrix_0()) && test_array_0()) && highp_param_0(1.0)) && mediump_param_0(2.0)) && lowp_param_0(3.0) ? float4(green) : red);
|
||||
return half4((((((test_scalar_0() && test_vector_0()) && test_matrix_0()) && test_array_0()) && highp_param_0(1.0)) && mediump_param_0(2.0)) && lowp_param_0(3.0) ? float4(green) : red);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user