mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[d3d11] Lock context in video context entry points
This commit is contained in:
parent
25607a0692
commit
3c22f4066b
@ -463,6 +463,8 @@ namespace dxvk {
|
|||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
BOOL Enable,
|
BOOL Enable,
|
||||||
const RECT* pRect) {
|
const RECT* pRect) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
||||||
state->outputTargetRectEnabled = Enable;
|
state->outputTargetRectEnabled = Enable;
|
||||||
|
|
||||||
@ -480,6 +482,8 @@ namespace dxvk {
|
|||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
BOOL YCbCr,
|
BOOL YCbCr,
|
||||||
const D3D11_VIDEO_COLOR* pColor) {
|
const D3D11_VIDEO_COLOR* pColor) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
||||||
state->outputBackgroundColorIsYCbCr = YCbCr;
|
state->outputBackgroundColorIsYCbCr = YCbCr;
|
||||||
state->outputBackgroundColor = *pColor;
|
state->outputBackgroundColor = *pColor;
|
||||||
@ -494,6 +498,8 @@ namespace dxvk {
|
|||||||
void STDMETHODCALLTYPE D3D11VideoContext::VideoProcessorSetOutputColorSpace(
|
void STDMETHODCALLTYPE D3D11VideoContext::VideoProcessorSetOutputColorSpace(
|
||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace) {
|
const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
||||||
state->outputColorSpace = *pColorSpace;
|
state->outputColorSpace = *pColorSpace;
|
||||||
}
|
}
|
||||||
@ -518,6 +524,8 @@ namespace dxvk {
|
|||||||
void STDMETHODCALLTYPE D3D11VideoContext::VideoProcessorSetOutputStereoMode(
|
void STDMETHODCALLTYPE D3D11VideoContext::VideoProcessorSetOutputStereoMode(
|
||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
BOOL Enable) {
|
BOOL Enable) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
||||||
state->outputStereoModeEnabled = Enable;
|
state->outputStereoModeEnabled = Enable;
|
||||||
|
|
||||||
@ -540,6 +548,8 @@ namespace dxvk {
|
|||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
D3D11_VIDEO_FRAME_FORMAT Format) {
|
D3D11_VIDEO_FRAME_FORMAT Format) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -556,6 +566,8 @@ namespace dxvk {
|
|||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace) {
|
const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *pColorSpace) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -580,6 +592,8 @@ namespace dxvk {
|
|||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
BOOL Enable,
|
BOOL Enable,
|
||||||
const RECT* pRect) {
|
const RECT* pRect) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -602,6 +616,8 @@ namespace dxvk {
|
|||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
BOOL Enable,
|
BOOL Enable,
|
||||||
const RECT* pRect) {
|
const RECT* pRect) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -669,6 +685,8 @@ namespace dxvk {
|
|||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
BOOL Enable) {
|
BOOL Enable) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -704,6 +722,8 @@ namespace dxvk {
|
|||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
BOOL Enable,
|
BOOL Enable,
|
||||||
D3D11_VIDEO_PROCESSOR_ROTATION Rotation) {
|
D3D11_VIDEO_PROCESSOR_ROTATION Rotation) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -721,6 +741,8 @@ namespace dxvk {
|
|||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
BOOL* pEnabled,
|
BOOL* pEnabled,
|
||||||
RECT* pRect) {
|
RECT* pRect) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
||||||
|
|
||||||
if (pEnabled)
|
if (pEnabled)
|
||||||
@ -735,6 +757,8 @@ namespace dxvk {
|
|||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
BOOL* pYCbCr,
|
BOOL* pYCbCr,
|
||||||
D3D11_VIDEO_COLOR* pColor) {
|
D3D11_VIDEO_COLOR* pColor) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
||||||
|
|
||||||
if (pYCbCr)
|
if (pYCbCr)
|
||||||
@ -748,6 +772,8 @@ namespace dxvk {
|
|||||||
void STDMETHODCALLTYPE D3D11VideoContext::VideoProcessorGetOutputColorSpace(
|
void STDMETHODCALLTYPE D3D11VideoContext::VideoProcessorGetOutputColorSpace(
|
||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) {
|
D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
||||||
|
|
||||||
if (pColorSpace)
|
if (pColorSpace)
|
||||||
@ -774,6 +800,8 @@ namespace dxvk {
|
|||||||
void STDMETHODCALLTYPE D3D11VideoContext::VideoProcessorGetOutputStereoMode(
|
void STDMETHODCALLTYPE D3D11VideoContext::VideoProcessorGetOutputStereoMode(
|
||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
BOOL* pEnabled) {
|
BOOL* pEnabled) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetState();
|
||||||
|
|
||||||
if (pEnabled)
|
if (pEnabled)
|
||||||
@ -795,6 +823,8 @@ namespace dxvk {
|
|||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
D3D11_VIDEO_FRAME_FORMAT* pFormat) {
|
D3D11_VIDEO_FRAME_FORMAT* pFormat) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -809,6 +839,8 @@ namespace dxvk {
|
|||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) {
|
D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -834,6 +866,8 @@ namespace dxvk {
|
|||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
BOOL* pEnabled,
|
BOOL* pEnabled,
|
||||||
RECT* pRect) {
|
RECT* pRect) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -852,6 +886,8 @@ namespace dxvk {
|
|||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
BOOL* pEnabled,
|
BOOL* pEnabled,
|
||||||
RECT* pRect) {
|
RECT* pRect) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -920,6 +956,8 @@ namespace dxvk {
|
|||||||
ID3D11VideoProcessor* pVideoProcessor,
|
ID3D11VideoProcessor* pVideoProcessor,
|
||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
BOOL* pEnabled) {
|
BOOL* pEnabled) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -955,6 +993,8 @@ namespace dxvk {
|
|||||||
UINT StreamIndex,
|
UINT StreamIndex,
|
||||||
BOOL* pEnable,
|
BOOL* pEnable,
|
||||||
D3D11_VIDEO_PROCESSOR_ROTATION* pRotation) {
|
D3D11_VIDEO_PROCESSOR_ROTATION* pRotation) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
auto state = static_cast<D3D11VideoProcessor*>(pVideoProcessor)->GetStreamState(StreamIndex);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
@ -974,6 +1014,8 @@ namespace dxvk {
|
|||||||
UINT FrameIdx,
|
UINT FrameIdx,
|
||||||
UINT StreamCount,
|
UINT StreamCount,
|
||||||
const D3D11_VIDEO_PROCESSOR_STREAM* pStreams) {
|
const D3D11_VIDEO_PROCESSOR_STREAM* pStreams) {
|
||||||
|
D3D10DeviceLock lock = m_ctx->LockContext();
|
||||||
|
|
||||||
auto videoProcessor = static_cast<D3D11VideoProcessor*>(pVideoProcessor);
|
auto videoProcessor = static_cast<D3D11VideoProcessor*>(pVideoProcessor);
|
||||||
bool hasStreamsEnabled = false;
|
bool hasStreamsEnabled = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user