mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
internal/graphicsdriver/directx: do not cache a vertex shader when an error occurs
This commit is contained in:
parent
dd7e125d9c
commit
8b588587cc
@ -404,7 +404,9 @@ func newShader(vs, ps string) (vsh, psh *_ID3DBlob, ferr error) {
|
||||
vsh = v
|
||||
} else {
|
||||
defer func() {
|
||||
vertexShaderCache[vs] = vsh
|
||||
if ferr == nil {
|
||||
vertexShaderCache[vs] = vsh
|
||||
}
|
||||
}()
|
||||
wg.Go(func() error {
|
||||
v, err := _D3DCompile([]byte(vs), "shader", nil, nil, "VSMain", "vs_5_0", flag, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user