Commit 1d31aca9 by Nicolas Capens

Deduplicate SRV creation.

BUG=angle:596 Change-Id: I2f4e0c4dd5c1182db1f67589f72dafef3717b363 Reviewed-on: https://chromium-review.googlesource.com/193231Tested-by: 's avatarNicolas Capens <nicolascapens@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent 76b258f8
......@@ -131,6 +131,8 @@ class TextureStorage11_2D : public TextureStorage11
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage11_2D);
ID3D11ShaderResourceView *createSRV(int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture);
ID3D11Texture2D *mTexture;
RenderTarget11 *mRenderTarget[gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS];
......@@ -166,6 +168,8 @@ class TextureStorage11_Cube : public TextureStorage11
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage11_Cube);
ID3D11ShaderResourceView *createSRV(bool arraySRV, int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture);
ID3D11Texture2D *mTexture;
RenderTarget11 *mRenderTarget[6][gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS];
......@@ -203,6 +207,8 @@ class TextureStorage11_3D : public TextureStorage11
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage11_3D);
ID3D11ShaderResourceView *createSRV(int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture);
typedef std::pair<int, int> LevelLayerKey;
typedef std::map<LevelLayerKey, RenderTarget11*> RenderTargetMap;
RenderTargetMap mLevelLayerRenderTargets;
......@@ -243,6 +249,8 @@ class TextureStorage11_2DArray : public TextureStorage11
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage11_2DArray);
ID3D11ShaderResourceView *createSRV(int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture);
typedef std::pair<int, int> LevelLayerKey;
typedef std::map<LevelLayerKey, RenderTarget11*> RenderTargetMap;
RenderTargetMap mRenderTargets;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment