mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-12 17:38:19 +00:00
[host] dxgi: allow the HDR texture to be shared with other backends
This commit is contained in:
parent
544164f637
commit
35b0f8edf3
@ -766,11 +766,19 @@ static bool dxgi_init(void)
|
||||
.SampleDesc.Quality = 0,
|
||||
.Usage = D3D11_USAGE_DEFAULT,
|
||||
.Format = DXGI_FORMAT_R10G10B10A2_UNORM,
|
||||
.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE,
|
||||
.BindFlags = D3D11_BIND_RENDER_TARGET |
|
||||
D3D11_BIND_SHADER_RESOURCE,
|
||||
.CPUAccessFlags = 0,
|
||||
.MiscFlags = 0
|
||||
.MiscFlags = D3D11_RESOURCE_MISC_SHARED_NTHANDLE |
|
||||
D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX
|
||||
};
|
||||
|
||||
// allow texture sharing with other backends
|
||||
if (this->backend != ©BackendD3D11)
|
||||
hdrTexDesc.MiscFlags |=
|
||||
D3D11_RESOURCE_MISC_SHARED_NTHANDLE |
|
||||
D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX;
|
||||
|
||||
status = ID3D11Device_CreateTexture2D(*this->device, &hdrTexDesc, NULL,
|
||||
(ID3D11Texture2D **)comRef_newGlobal(&this->texture[i].hdrTex));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user