blob: 5afe4188648618c5a631825b91f97ae0188fafed [file] [log] [blame]
daniel@transgaming.com4834ee22013-01-11 04:06:16 +00001//
2// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7// TextureStorage11.cpp: Implements the abstract rx::TextureStorage11 class and its concrete derived
8// classes TextureStorage11_2D and TextureStorage11_Cube, which act as the interface to the D3D11 texture.
9
10#include "libGLESv2/renderer/TextureStorage11.h"
11
12#include "libGLESv2/renderer/Renderer11.h"
13#include "libGLESv2/renderer/RenderTarget11.h"
14#include "libGLESv2/renderer/SwapChain11.h"
15#include "libGLESv2/renderer/renderer11_utils.h"
16
17#include "libGLESv2/main.h"
18
19namespace rx
20{
21
22TextureStorage11::TextureStorage11(Renderer *renderer, UINT bindFlags)
23 : mBindFlags(bindFlags),
daniel@transgaming.comb1154552013-01-11 04:11:02 +000024 mLodOffset(0),
25 mMipLevels(0)
daniel@transgaming.com4834ee22013-01-11 04:06:16 +000026{
27 mRenderer = Renderer11::makeRenderer11(renderer);
28}
29
30TextureStorage11::~TextureStorage11()
31{
daniel@transgaming.com1e1b5e92013-01-11 04:11:27 +000032}
daniel@transgaming.com4834ee22013-01-11 04:06:16 +000033
34TextureStorage11 *TextureStorage11::makeTextureStorage11(TextureStorage *storage)
35{
36 ASSERT(dynamic_cast<TextureStorage11*>(storage) != NULL);
37 return static_cast<TextureStorage11*>(storage);
38}
39
40DWORD TextureStorage11::GetTextureBindFlags(DXGI_FORMAT format, GLenum glusage, bool forceRenderable)
41{
42 UINT bindFlags = D3D11_BIND_SHADER_RESOURCE;
43
44 if (format == DXGI_FORMAT_D24_UNORM_S8_UINT)
45 {
46 bindFlags |= D3D11_BIND_DEPTH_STENCIL;
47 }
48 else if(forceRenderable || (TextureStorage11::IsTextureFormatRenderable(format) && (glusage == GL_FRAMEBUFFER_ATTACHMENT_ANGLE)))
49 {
50 bindFlags |= D3D11_BIND_RENDER_TARGET;
51 }
52 return bindFlags;
53}
54
55bool TextureStorage11::IsTextureFormatRenderable(DXGI_FORMAT format)
56{
57 switch(format)
58 {
59 case DXGI_FORMAT_R8G8B8A8_UNORM:
60 case DXGI_FORMAT_A8_UNORM:
61 case DXGI_FORMAT_R32G32B32A32_FLOAT:
62 case DXGI_FORMAT_R32G32B32_FLOAT:
63 case DXGI_FORMAT_R16G16B16A16_FLOAT:
64 case DXGI_FORMAT_B8G8R8A8_UNORM:
65 case DXGI_FORMAT_R8_UNORM:
66 case DXGI_FORMAT_R8G8_UNORM:
67 case DXGI_FORMAT_R16_FLOAT:
68 case DXGI_FORMAT_R16G16_FLOAT:
69 return true;
70 case DXGI_FORMAT_BC1_UNORM:
71 case DXGI_FORMAT_BC2_UNORM:
72 case DXGI_FORMAT_BC3_UNORM:
73 return false;
74 default:
75 UNREACHABLE();
76 return false;
77 }
78}
79
80UINT TextureStorage11::getBindFlags() const
81{
82 return mBindFlags;
83}
84
85int TextureStorage11::getLodOffset() const
86{
87 return mLodOffset;
88}
89
90bool TextureStorage11::isRenderTarget() const
91{
92 return (mBindFlags & (D3D11_BIND_RENDER_TARGET | D3D11_BIND_DEPTH_STENCIL)) != 0;
93}
94
95bool TextureStorage11::isManaged() const
96{
97 return false;
98}
99
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000100int TextureStorage11::levelCount()
101{
102 int levels = 0;
103 if (getBaseTexture())
104 {
daniel@transgaming.comb1154552013-01-11 04:11:02 +0000105 levels = mMipLevels - getLodOffset();
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000106 }
107 return levels;
108}
109
daniel@transgaming.com9a2f54d2013-01-11 04:06:36 +0000110UINT TextureStorage11::getSubresourceIndex(int level, int faceIndex)
111{
112 UINT index = 0;
113 if (getBaseTexture())
114 {
daniel@transgaming.comb1154552013-01-11 04:11:02 +0000115 index = D3D11CalcSubresource(level, faceIndex, mMipLevels);
daniel@transgaming.com9a2f54d2013-01-11 04:06:36 +0000116 }
117 return index;
118}
119
120bool TextureStorage11::updateSubresourceLevel(ID3D11Texture2D *srcTexture, int level, int face, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height)
121{
122 if (srcTexture)
123 {
124 D3D11_BOX srcBox;
125 srcBox.left = xoffset;
126 srcBox.top = yoffset;
127 srcBox.right = xoffset + width;
128 srcBox.bottom = yoffset + height;
129 srcBox.front = 0;
130 srcBox.back = 1;
131
132 ID3D11DeviceContext *context = mRenderer->getDeviceContext();
133
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000134 ASSERT(getBaseTexture());
daniel@transgaming.com9a2f54d2013-01-11 04:06:36 +0000135 context->CopySubresourceRegion(getBaseTexture(), getSubresourceIndex(level, face), xoffset, yoffset, 0, srcTexture, 0, &srcBox);
136 return true;
137 }
138
139 return false;
140}
141
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000142TextureStorage11_2D::TextureStorage11_2D(Renderer *renderer, SwapChain11 *swapchain)
143 : TextureStorage11(renderer, D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE)
144{
145 ID3D11Texture2D *surfaceTexture = swapchain->getOffscreenTexture();
146 mTexture = surfaceTexture;
daniel@transgaming.comb50d5302013-01-11 04:07:29 +0000147 mSRV = NULL;
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000148
149 for (unsigned int i = 0; i < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; i++)
150 {
151 mRenderTarget[i] = NULL;
152 }
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000153
154 D3D11_TEXTURE2D_DESC desc;
155 surfaceTexture->GetDesc(&desc);
156
daniel@transgaming.comb1154552013-01-11 04:11:02 +0000157 mMipLevels = desc.MipLevels;
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000158 mTextureFormat = desc.Format;
159 mTextureWidth = desc.Width;
160 mTextureHeight = desc.Height;
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000161}
162
163TextureStorage11_2D::TextureStorage11_2D(Renderer *renderer, int levels, GLenum internalformat, GLenum usage, bool forceRenderable, GLsizei width, GLsizei height)
164 : TextureStorage11(renderer, GetTextureBindFlags(gl_d3d11::ConvertTextureFormat(internalformat), usage, forceRenderable))
165{
166 mTexture = NULL;
daniel@transgaming.comb50d5302013-01-11 04:07:29 +0000167 mSRV = NULL;
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000168 mTextureWidth = 0;
169 mTextureHeight = 0;
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000170 DXGI_FORMAT format = gl_d3d11::ConvertTextureFormat(internalformat);
daniel@transgaming.comb1154552013-01-11 04:11:02 +0000171
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000172 for (unsigned int i = 0; i < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; i++)
173 {
174 mRenderTarget[i] = NULL;
175 }
176
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000177 // if the width or height is not positive this should be treated as an incomplete texture
178 // we handle that here by skipping the d3d texture creation
179 if (width > 0 && height > 0)
180 {
181 // adjust size if needed for compressed textures
182 gl::MakeValidSize(false, gl::IsCompressed(internalformat), &width, &height, &mLodOffset);
183
184 ID3D11Device *device = mRenderer->getDevice();
185
186 D3D11_TEXTURE2D_DESC desc;
187 desc.Width = width; // Compressed texture size constraints?
188 desc.Height = height;
189 desc.MipLevels = levels + mLodOffset;
190 desc.ArraySize = 1;
191 desc.Format = format;
192 desc.SampleDesc.Count = 1;
193 desc.SampleDesc.Quality = 0;
194 desc.Usage = D3D11_USAGE_DEFAULT;
195 desc.BindFlags = getBindFlags();
196 desc.CPUAccessFlags = 0;
197 desc.MiscFlags = 0;
198
199 HRESULT result = device->CreateTexture2D(&desc, NULL, &mTexture);
200
201 if (FAILED(result))
202 {
203 ASSERT(result == E_OUTOFMEMORY);
204 ERR("Creating image failed.");
205 error(GL_OUT_OF_MEMORY);
206 }
daniel@transgaming.comb1154552013-01-11 04:11:02 +0000207 else
208 {
209 mTexture->GetDesc(&desc);
210 mMipLevels = desc.MipLevels;
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000211 mTextureFormat = desc.Format;
212 mTextureWidth = desc.Width;
213 mTextureHeight = desc.Height;
daniel@transgaming.comb1154552013-01-11 04:11:02 +0000214 }
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000215 }
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000216}
217
218TextureStorage11_2D::~TextureStorage11_2D()
219{
220 if (mTexture)
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000221 {
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000222 mTexture->Release();
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000223 mTexture = NULL;
224 }
daniel@transgaming.com1e1b5e92013-01-11 04:11:27 +0000225
226 if (mSRV)
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000227 {
daniel@transgaming.com1e1b5e92013-01-11 04:11:27 +0000228 mSRV->Release();
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000229 mSRV = NULL;
230 }
231
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000232 for (unsigned int i = 0; i < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; i++)
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000233 {
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000234 delete mRenderTarget[i];
235 mRenderTarget[i] = NULL;
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000236 }
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000237}
238
239TextureStorage11_2D *TextureStorage11_2D::makeTextureStorage11_2D(TextureStorage *storage)
240{
241 ASSERT(dynamic_cast<TextureStorage11_2D*>(storage) != NULL);
242 return static_cast<TextureStorage11_2D*>(storage);
243}
244
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000245RenderTarget *TextureStorage11_2D::getRenderTarget(int level)
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000246{
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000247 if (level >= 0 && level < static_cast<int>(mMipLevels))
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000248 {
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000249 if (!mRenderTarget[level])
250 {
251 ID3D11Device *device = mRenderer->getDevice();
252 HRESULT result;
253
254 D3D11_RENDER_TARGET_VIEW_DESC rtvDesc;
255 rtvDesc.Format = mTextureFormat;
256 rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
257 rtvDesc.Texture2D.MipSlice = level;
258
259 ID3D11RenderTargetView *rtv;
260 result = device->CreateRenderTargetView(mTexture, &rtvDesc, &rtv);
261
262 if (result == E_OUTOFMEMORY)
263 {
264 return error(GL_OUT_OF_MEMORY, static_cast<RenderTarget*>(NULL));
265 }
266 ASSERT(SUCCEEDED(result));
267
268 mRenderTarget[level] = new RenderTarget11(mRenderer, rtv,
269 std::max(mTextureWidth >> level, 1U),
270 std::max(mTextureHeight >> level, 1U));
271 }
272
273 return mRenderTarget[level];
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000274 }
275 else
276 {
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000277 return NULL;
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000278 }
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000279}
280
281ID3D11Texture2D *TextureStorage11_2D::getBaseTexture() const
282{
283 return mTexture;
284}
285
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000286ID3D11ShaderResourceView *TextureStorage11_2D::getSRV()
daniel@transgaming.comb50d5302013-01-11 04:07:29 +0000287{
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000288 if (!mSRV)
289 {
290 ID3D11Device *device = mRenderer->getDevice();
291
292 D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;
293 srvDesc.Format = mTextureFormat;
294 srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
295 srvDesc.Texture2D.MipLevels = (mMipLevels == 0 ? -1 : mMipLevels);
296 srvDesc.Texture2D.MostDetailedMip = 0;
297
298 HRESULT result = device->CreateShaderResourceView(mTexture, &srvDesc, &mSRV);
299
300 if (result == E_OUTOFMEMORY)
301 {
302 return error(GL_OUT_OF_MEMORY, static_cast<ID3D11ShaderResourceView*>(NULL));
303 }
304 ASSERT(SUCCEEDED(result));
305 }
306
daniel@transgaming.comb50d5302013-01-11 04:07:29 +0000307 return mSRV;
308}
309
daniel@transgaming.com4834ee22013-01-11 04:06:16 +0000310void TextureStorage11_2D::generateMipmap(int level)
311{
312 // TODO
313 UNIMPLEMENTED();
314}
315
daniel@transgaming.comb2151e52013-01-11 04:06:24 +0000316TextureStorage11_Cube::TextureStorage11_Cube(Renderer *renderer, int levels, GLenum internalformat, GLenum usage, bool forceRenderable, int size)
317 : TextureStorage11(renderer, GetTextureBindFlags(gl_d3d11::ConvertTextureFormat(internalformat), usage, forceRenderable))
318{
319 mTexture = NULL;
daniel@transgaming.comb50d5302013-01-11 04:07:29 +0000320 mSRV = NULL;
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000321 mTextureWidth = 0;
322 mTextureHeight = 0;
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000323
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000324 for (unsigned int i = 0; i < 6; i++)
daniel@transgaming.com5cdd0582013-01-11 04:07:35 +0000325 {
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000326 for (unsigned int j = 0; j < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; j++)
327 {
328 mRenderTarget[i][j] = NULL;
329 }
daniel@transgaming.com5cdd0582013-01-11 04:07:35 +0000330 }
331
daniel@transgaming.comb2151e52013-01-11 04:06:24 +0000332 DXGI_FORMAT format = gl_d3d11::ConvertTextureFormat(internalformat);
333 // if the size is not positive this should be treated as an incomplete texture
334 // we handle that here by skipping the d3d texture creation
335 if (size > 0)
336 {
337 // adjust size if needed for compressed textures
338 int height = size;
339 gl::MakeValidSize(false, gl::IsCompressed(internalformat), &size, &height, &mLodOffset);
340
341 ID3D11Device *device = mRenderer->getDevice();
342
343 D3D11_TEXTURE2D_DESC desc;
344 desc.Width = size;
345 desc.Height = size;
346 desc.MipLevels = levels + mLodOffset;
347 desc.ArraySize = 6;
348 desc.Format = format;
349 desc.SampleDesc.Count = 1;
350 desc.SampleDesc.Quality = 0;
351 desc.Usage = D3D11_USAGE_DEFAULT;
352 desc.BindFlags = getBindFlags();
353 desc.CPUAccessFlags = 0;
354 desc.MiscFlags = D3D11_RESOURCE_MISC_TEXTURECUBE;
355
356 HRESULT result = device->CreateTexture2D(&desc, NULL, &mTexture);
357
358 if (FAILED(result))
359 {
360 ASSERT(result == E_OUTOFMEMORY);
361 ERR("Creating image failed.");
362 error(GL_OUT_OF_MEMORY);
363 }
daniel@transgaming.comb1154552013-01-11 04:11:02 +0000364 else
365 {
366 mTexture->GetDesc(&desc);
367 mMipLevels = desc.MipLevels;
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000368 mTextureFormat = desc.Format;
369 mTextureWidth = desc.Width;
370 mTextureHeight = desc.Height;
daniel@transgaming.comb1154552013-01-11 04:11:02 +0000371 }
daniel@transgaming.comb2151e52013-01-11 04:06:24 +0000372 }
daniel@transgaming.comb2151e52013-01-11 04:06:24 +0000373}
374
375TextureStorage11_Cube::~TextureStorage11_Cube()
376{
377 if (mTexture)
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000378 {
daniel@transgaming.comb2151e52013-01-11 04:06:24 +0000379 mTexture->Release();
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000380 mTexture = NULL;
381 }
daniel@transgaming.com1e1b5e92013-01-11 04:11:27 +0000382
383 if (mSRV)
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000384 {
daniel@transgaming.com1e1b5e92013-01-11 04:11:27 +0000385 mSRV->Release();
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000386 mSRV = NULL;
387 }
388
389 for (unsigned int i = 0; i < 6; i++)
390 {
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000391 for (unsigned int j = 0; j < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; j++)
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000392 {
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000393 delete mRenderTarget[i][j];
394 mRenderTarget[i][j] = NULL;
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000395 }
396 }
daniel@transgaming.comb2151e52013-01-11 04:06:24 +0000397}
398
399TextureStorage11_Cube *TextureStorage11_Cube::makeTextureStorage11_Cube(TextureStorage *storage)
400{
401 ASSERT(dynamic_cast<TextureStorage11_Cube*>(storage) != NULL);
402 return static_cast<TextureStorage11_Cube*>(storage);
403}
404
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000405RenderTarget *TextureStorage11_Cube::getRenderTarget(GLenum faceTarget, int level)
daniel@transgaming.comb2151e52013-01-11 04:06:24 +0000406{
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000407 unsigned int faceIdx = gl::TextureCubeMap::faceIndex(faceTarget);
408 if (level >= 0 && level < static_cast<int>(mMipLevels))
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000409 {
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000410 if (!mRenderTarget[faceIdx][level])
411 {
412 ID3D11Device *device = mRenderer->getDevice();
413 HRESULT result;
414
415 if (getBindFlags() & D3D11_BIND_RENDER_TARGET)
416 {
417 D3D11_RENDER_TARGET_VIEW_DESC rtvDesc;
418 rtvDesc.Format = mTextureFormat;
419 rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY;
420 rtvDesc.Texture2DArray.MipSlice = level;
421 rtvDesc.Texture2DArray.FirstArraySlice = faceIdx;
422 rtvDesc.Texture2DArray.ArraySize = 1;
423
424 ID3D11RenderTargetView *rtv;
425 result = device->CreateRenderTargetView(mTexture, &rtvDesc, &rtv);
426
427 if (result == E_OUTOFMEMORY)
428 {
429 return error(GL_OUT_OF_MEMORY, static_cast<RenderTarget*>(NULL));
430 }
431 ASSERT(SUCCEEDED(result));
432
433 mRenderTarget[faceIdx][level] = new RenderTarget11(mRenderer, rtv,
434 std::max(mTextureWidth >> level, 1U),
435 std::max(mTextureHeight >> level, 1U));
436 }
437 else if (getBindFlags() & D3D11_BIND_DEPTH_STENCIL)
438 {
439 // TODO
440 UNIMPLEMENTED();
441 }
442 else UNREACHABLE();
443 }
444
445 return mRenderTarget[faceIdx][level];
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000446 }
447 else
448 {
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000449 return NULL;
shannon.woods@transgaming.com4b472352013-01-25 21:14:56 +0000450 }
daniel@transgaming.comb2151e52013-01-11 04:06:24 +0000451}
452
453ID3D11Texture2D *TextureStorage11_Cube::getBaseTexture() const
454{
455 return mTexture;
456}
457
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000458ID3D11ShaderResourceView *TextureStorage11_Cube::getSRV()
daniel@transgaming.comb50d5302013-01-11 04:07:29 +0000459{
shannon.woods@transgaming.com858d32f2013-01-25 21:49:59 +0000460 if (!mSRV)
461 {
462 ID3D11Device *device = mRenderer->getDevice();
463
464 D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;
465 srvDesc.Format = mTextureFormat;
466 srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE;
467 srvDesc.TextureCube.MipLevels = (mMipLevels == 0 ? -1 : mMipLevels);
468 srvDesc.TextureCube.MostDetailedMip = 0;
469
470 HRESULT result = device->CreateShaderResourceView(mTexture, &srvDesc, &mSRV);
471
472 if (result == E_OUTOFMEMORY)
473 {
474 return error(GL_OUT_OF_MEMORY, static_cast<ID3D11ShaderResourceView*>(NULL));
475 }
476 ASSERT(SUCCEEDED(result));
477 }
478
daniel@transgaming.comb50d5302013-01-11 04:07:29 +0000479 return mSRV;
480}
481
daniel@transgaming.comb2151e52013-01-11 04:06:24 +0000482void TextureStorage11_Cube::generateMipmap(int face, int level)
483{
484 // TODO
485 UNIMPLEMENTED();
486}
487
daniel@transgaming.comb2151e52013-01-11 04:06:24 +0000488}