From dbbe4ee09c285f214b2a092b70ee9324bd746082 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 17 May 2020 02:46:02 +0900 Subject: [PATCH] shaderir: Add StructMember --- internal/shaderir/glsl.go | 2 ++ internal/shaderir/program.go | 1 + 2 files changed, 3 insertions(+) diff --git a/internal/shaderir/glsl.go b/internal/shaderir/glsl.go index b00373182..dfdc51c24 100644 --- a/internal/shaderir/glsl.go +++ b/internal/shaderir/glsl.go @@ -193,6 +193,8 @@ func (p *Program) glslBlock(b *Block, level int, localVarIndex int) []string { switch e.Variable.Type { case Uniform: return fmt.Sprintf("U%d", e.Variable.Index) + case StructMember: + return fmt.Sprintf("M%d", e.Variable.Index) case Local: idx := e.Variable.Index switch b { diff --git a/internal/shaderir/program.go b/internal/shaderir/program.go index 6ff7b161a..ea04fd396 100644 --- a/internal/shaderir/program.go +++ b/internal/shaderir/program.go @@ -119,6 +119,7 @@ type VariableType int const ( Uniform VariableType = iota + StructMember Local )