internal/graphicsdriver/metal: bug fix: go vet failed

view must not be copied.

Updates #2282
This commit is contained in:
Hajime Hoshi 2022-09-06 19:09:10 +09:00
parent 35f597e682
commit bb406c9b8f
2 changed files with 2 additions and 2 deletions

View File

@ -854,7 +854,7 @@ func (g *Graphics) DrawTriangles(dstID graphicsdriver.ImageID, srcIDs [graphics.
noStencil,
} {
var err error
rpss[stencil], err = g.shaders[shaderID].RenderPipelineState(g.view, mode, stencil, dst.screen)
rpss[stencil], err = g.shaders[shaderID].RenderPipelineState(&g.view, mode, stencil, dst.screen)
if err != nil {
return err
}

View File

@ -86,7 +86,7 @@ func (s *Shader) init(device mtl.Device) error {
return nil
}
func (s *Shader) RenderPipelineState(view view, compositeMode graphicsdriver.CompositeMode, stencilMode stencilMode, screen bool) (mtl.RenderPipelineState, error) {
func (s *Shader) RenderPipelineState(view *view, compositeMode graphicsdriver.CompositeMode, stencilMode stencilMode, screen bool) (mtl.RenderPipelineState, error) {
key := shaderRpsKey{
compositeMode: compositeMode,
stencilMode: stencilMode,