Fix test failures

This commit is contained in:
Hajime Hoshi 2020-09-08 03:01:27 +09:00
parent 1786be55f7
commit 3b040e5f22
2 changed files with 19 additions and 19 deletions

View File

@ -280,7 +280,7 @@ void F0(in float l0, in vec2 l1, in vec4 l2, out mat4 l3) {
Return: Type{Main: Float}, Return: Type{Main: Float},
Block: block( Block: block(
nil, nil,
0, 1,
returnStmt( returnStmt(
localVariableExpr(0), localVariableExpr(0),
), ),
@ -401,7 +401,7 @@ void F0(in float l0, out float l1) {
}, },
Block: block( Block: block(
nil, nil,
0, 3,
assignStmt( assignStmt(
localVariableExpr(2), localVariableExpr(2),
binaryExpr( binaryExpr(
@ -442,7 +442,7 @@ void F0(in float l0, in float l1, out float l2) {
}, },
Block: block( Block: block(
nil, nil,
0, 4,
assignStmt( assignStmt(
localVariableExpr(3), localVariableExpr(3),
selectionExpr( selectionExpr(
@ -482,7 +482,7 @@ void F0(in bool l0, in float l1, in float l2, out float l3) {
}, },
Block: block( Block: block(
nil, nil,
0, 3,
exprStmt( exprStmt(
callExpr( callExpr(
functionExpr(1), functionExpr(1),
@ -529,7 +529,7 @@ void F0(in float l0, in float l1, out vec2 l2) {
}, },
Block: block( Block: block(
nil, nil,
0, 3,
assignStmt( assignStmt(
localVariableExpr(2), localVariableExpr(2),
callExpr( callExpr(
@ -568,7 +568,7 @@ void F0(in float l0, in float l1, out float l2) {
}, },
Block: block( Block: block(
nil, nil,
0, 2,
assignStmt( assignStmt(
localVariableExpr(1), localVariableExpr(1),
fieldSelectorExpr( fieldSelectorExpr(
@ -607,7 +607,7 @@ void F0(in vec4 l0, out vec2 l1) {
}, },
Block: block( Block: block(
nil, nil,
0, 3,
ifStmt( ifStmt(
binaryExpr( binaryExpr(
EqualOp, EqualOp,
@ -616,7 +616,7 @@ void F0(in vec4 l0, out vec2 l1) {
), ),
block( block(
nil, nil,
0, 3,
assignStmt( assignStmt(
localVariableExpr(2), localVariableExpr(2),
localVariableExpr(0), localVariableExpr(0),
@ -624,7 +624,7 @@ void F0(in vec4 l0, out vec2 l1) {
), ),
block( block(
nil, nil,
0, 3,
assignStmt( assignStmt(
localVariableExpr(2), localVariableExpr(2),
localVariableExpr(1), localVariableExpr(1),
@ -672,7 +672,7 @@ void F0(in float l0, in float l1, out float l2) {
[]Type{ []Type{
{}, {},
}, },
0, 3,
forStmt( forStmt(
Type{Main: Int}, Type{Main: Int},
3, 3,
@ -682,7 +682,7 @@ void F0(in float l0, in float l1, out float l2) {
1, 1,
block( block(
nil, nil,
4, 3,
assignStmt( assignStmt(
localVariableExpr(2), localVariableExpr(2),
localVariableExpr(0), localVariableExpr(0),
@ -726,7 +726,7 @@ void F0(in float l0, in float l1, out float l2) {
[]Type{ []Type{
{}, {},
}, },
0, 3,
forStmt( forStmt(
Type{Main: Int}, Type{Main: Int},
3, 3,
@ -799,7 +799,7 @@ void F0(float l0, float l1, thread float& l2) {
{}, {},
{}, {},
}, },
0, 3,
forStmt( forStmt(
Type{Main: Int}, Type{Main: Int},
3, 3,
@ -902,7 +902,7 @@ void F0(float l0, float l1, thread float& l2) {
VertexFunc: VertexFunc{ VertexFunc: VertexFunc{
Block: block( Block: block(
nil, nil,
0, 5,
assignStmt( assignStmt(
localVariableExpr(3), localVariableExpr(3),
localVariableExpr(0), localVariableExpr(0),
@ -953,7 +953,7 @@ varying vec2 V1;`,
VertexFunc: VertexFunc{ VertexFunc: VertexFunc{
Block: block( Block: block(
nil, nil,
0, 5+1,
assignStmt( assignStmt(
localVariableExpr(3), localVariableExpr(3),
localVariableExpr(0), localVariableExpr(0),
@ -974,7 +974,7 @@ varying vec2 V1;`,
{Main: Float}, {Main: Float},
{Main: Vec2}, {Main: Vec2},
}, },
0, 3+1,
assignStmt( assignStmt(
localVariableExpr(3), localVariableExpr(3),
localVariableExpr(0), localVariableExpr(0),

View File

@ -174,7 +174,7 @@ var (
} }
defaultVertexFunc = shaderir.VertexFunc{ defaultVertexFunc = shaderir.VertexFunc{
Block: &shaderir.Block{ Block: &shaderir.Block{
LocalVarIndexOffset: 0, LocalVarIndexOffset: 4 + 1,
Stmts: []shaderir.Stmt{ Stmts: []shaderir.Stmt{
{ {
Type: shaderir.Assign, Type: shaderir.Assign,
@ -285,7 +285,7 @@ func ShaderProgramFill(r, g, b, a byte) shaderir.Program {
p := defaultProgram() p := defaultProgram()
p.FragmentFunc = shaderir.FragmentFunc{ p.FragmentFunc = shaderir.FragmentFunc{
Block: &shaderir.Block{ Block: &shaderir.Block{
LocalVarIndexOffset: 0, LocalVarIndexOffset: 2 + 1,
Stmts: []shaderir.Stmt{ Stmts: []shaderir.Stmt{
{ {
Type: shaderir.Assign, Type: shaderir.Assign,
@ -423,7 +423,7 @@ func ShaderProgramImages(imageNum int) shaderir.Program {
LocalVars: []shaderir.Type{ LocalVars: []shaderir.Type{
{Main: shaderir.Vec4}, {Main: shaderir.Vec4},
}, },
LocalVarIndexOffset: 0, LocalVarIndexOffset: 2 + 1,
Stmts: stmts, Stmts: stmts,
}, },
} }