mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/graphicsdriver/directx: refactoring
This commit is contained in:
parent
fda0b1cbcb
commit
8e1bd4eaba
@ -403,6 +403,9 @@ func newShader(vs, ps string) (vsh, psh *_ID3DBlob, ferr error) {
|
|||||||
v.AddRef()
|
v.AddRef()
|
||||||
vsh = v
|
vsh = v
|
||||||
} else {
|
} else {
|
||||||
|
defer func() {
|
||||||
|
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)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -425,8 +428,6 @@ func newShader(vs, ps string) (vsh, psh *_ID3DBlob, ferr error) {
|
|||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
vertexShaderCache[vs] = vsh
|
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user