mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
gpu: don't validate uniform locations
Sufficiently smart GPU drivers can eliminate unused uniforms across shader types. Fixes gio#158 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -37,14 +37,6 @@ func CreateProgram(ctx Functions, vsSrc, fsSrc string, attribs []string) (Progra
|
||||
return prog, nil
|
||||
}
|
||||
|
||||
func GetUniformLocation(ctx Functions, prog Program, name string) Uniform {
|
||||
loc := ctx.GetUniformLocation(prog, name)
|
||||
if !loc.valid() {
|
||||
panic(fmt.Errorf("uniform %s not found", name))
|
||||
}
|
||||
return loc
|
||||
}
|
||||
|
||||
func createShader(ctx Functions, typ Enum, src string) (Shader, error) {
|
||||
sh := ctx.CreateShader(typ)
|
||||
if !sh.valid() {
|
||||
|
||||
Reference in New Issue
Block a user