mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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
|
vsh = v
|
||||||
} else {
|
} else {
|
||||||
defer func() {
|
defer func() {
|
||||||
|
if ferr == nil {
|
||||||
vertexShaderCache[vs] = vsh
|
vertexShaderCache[vs] = vsh
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
wg.Go(func() error {
|
wg.Go(func() error {
|
||||||
v, err := _D3DCompile([]byte(vs), "shader", nil, nil, "VSMain", "vs_5_0", flag, 0)
|
v, err := _D3DCompile([]byte(vs), "shader", nil, nil, "VSMain", "vs_5_0", flag, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user