Create SRVs for all textures in the pool during initialization

This commit is contained in:
Cameron Gutman
2022-02-05 14:49:08 -06:00
parent 1942e72474
commit 04a0aca221
2 changed files with 66 additions and 35 deletions
@@ -28,6 +28,7 @@ private:
static void unlockContext(void* lock_ctx);
bool setupRenderingResources();
bool setupTexturePoolViews(AVD3D11VAFramesContext* frameContext);
void renderOverlay(Overlay::OverlayType type);
void updateColorConversionConstants(AVFrame* frame);
void renderVideo(AVFrame* frame);
@@ -53,6 +54,9 @@ private:
ID3D11PixelShader* m_VideoPixelShader;
ID3D11Buffer* m_VideoVertexBuffer;
#define DECODER_BUFFER_POOL_SIZE 17
ID3D11ShaderResourceView* m_VideoTextureResourceViews[DECODER_BUFFER_POOL_SIZE][2];
SDL_SpinLock m_OverlayLock;
ID3D11Buffer* m_OverlayVertexBuffers[Overlay::OverlayMax];
ID3D11Texture2D* m_OverlayTextures[Overlay::OverlayMax];