Add Video module
This commit is contained in:
@@ -296,6 +296,7 @@ struct GPUDevice::PrivateData
|
||||
AssetReference<Shader> QuadShader;
|
||||
GPUPipelineState* PS_CopyLinear = nullptr;
|
||||
GPUPipelineState* PS_Clear = nullptr;
|
||||
GPUPipelineState* PS_DecodeYUY2 = nullptr;
|
||||
GPUBuffer* FullscreenTriangleVB = nullptr;
|
||||
AssetReference<Material> DefaultMaterial;
|
||||
SoftAssetReference<Material> DefaultDeformableMaterial;
|
||||
@@ -489,6 +490,7 @@ void GPUDevice::preDispose()
|
||||
_res->DefaultBlackTexture = nullptr;
|
||||
SAFE_DELETE_GPU_RESOURCE(_res->PS_CopyLinear);
|
||||
SAFE_DELETE_GPU_RESOURCE(_res->PS_Clear);
|
||||
SAFE_DELETE_GPU_RESOURCE(_res->PS_DecodeYUY2);
|
||||
SAFE_DELETE_GPU_RESOURCE(_res->FullscreenTriangleVB);
|
||||
|
||||
Locker.Unlock();
|
||||
@@ -701,6 +703,18 @@ GPUPipelineState* GPUDevice::GetClearPS() const
|
||||
return _res->PS_Clear;
|
||||
}
|
||||
|
||||
GPUPipelineState* GPUDevice::GetDecodeYUY2PS() const
|
||||
{
|
||||
if (_res->PS_DecodeYUY2 == nullptr)
|
||||
{
|
||||
auto psDesc = GPUPipelineState::Description::DefaultFullscreenTriangle;
|
||||
psDesc.PS = QuadShader->GetPS("PS_DecodeYUY2");
|
||||
_res->PS_DecodeYUY2 = const_cast<GPUDevice*>(this)->CreatePipelineState();
|
||||
_res->PS_DecodeYUY2->Init(psDesc);
|
||||
}
|
||||
return _res->PS_DecodeYUY2;
|
||||
}
|
||||
|
||||
GPUBuffer* GPUDevice::GetFullscreenTriangleVB() const
|
||||
{
|
||||
return _res->FullscreenTriangleVB;
|
||||
|
||||
Reference in New Issue
Block a user