blob: 29d894a99ce372cae31b70656fe5734f7994350e [file] [log] [blame]
shannon.woods@transgaming.combdf2d802013-02-28 23:16:20 +00001#include "precompiled.h"
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +00002//
3// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style license that can be
5// found in the LICENSE file.
6//
7
8// RenderTarget11.cpp: Implements a DX11-specific wrapper for ID3D11View pointers
9// retained by Renderbuffers.
10
11#include "libGLESv2/renderer/RenderTarget11.h"
12#include "libGLESv2/renderer/Renderer11.h"
13
14#include "libGLESv2/renderer/renderer11_utils.h"
15#include "libGLESv2/main.h"
16
17namespace rx
18{
19
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +000020static bool getTextureProperties(ID3D11Resource *resource, unsigned int *mipLevels, unsigned int *samples)
21{
22 ID3D11Texture1D *texture1D = d3d11::DynamicCastComObject<ID3D11Texture1D>(resource);
23 if (texture1D)
24 {
25 D3D11_TEXTURE1D_DESC texDesc;
26 texture1D->GetDesc(&texDesc);
27 texture1D->Release();
28
29 *mipLevels = texDesc.MipLevels;
30 *samples = 0;
31
32 return true;
33 }
34
35 ID3D11Texture2D *texture2D = d3d11::DynamicCastComObject<ID3D11Texture2D>(resource);
36 if (texture2D)
37 {
38 D3D11_TEXTURE2D_DESC texDesc;
39 texture2D->GetDesc(&texDesc);
40 texture2D->Release();
41
42 *mipLevels = texDesc.MipLevels;
43 *samples = texDesc.SampleDesc.Count > 1 ? texDesc.SampleDesc.Count : 0;
44
45 return true;
46 }
47
48 ID3D11Texture3D *texture3D = d3d11::DynamicCastComObject<ID3D11Texture3D>(resource);
49 if (texture3D)
50 {
51 D3D11_TEXTURE3D_DESC texDesc;
52 texture3D->GetDesc(&texDesc);
53 texture3D->Release();
54
55 *mipLevels = texDesc.MipLevels;
56 *samples = 0;
57
58 return true;
59 }
60
61 return false;
62}
63
64static unsigned int getRTVSubresourceIndex(ID3D11Resource *resource, ID3D11RenderTargetView *view)
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +000065{
66 D3D11_RENDER_TARGET_VIEW_DESC rtvDesc;
67 view->GetDesc(&rtvDesc);
68
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +000069 unsigned int mipSlice = 0;
70 unsigned int arraySlice = 0;
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +000071
72 switch (rtvDesc.ViewDimension)
73 {
74 case D3D11_RTV_DIMENSION_TEXTURE1D:
75 mipSlice = rtvDesc.Texture1D.MipSlice;
76 arraySlice = 0;
77 break;
78
79 case D3D11_RTV_DIMENSION_TEXTURE1DARRAY:
80 mipSlice = rtvDesc.Texture1DArray.MipSlice;
81 arraySlice = rtvDesc.Texture1DArray.FirstArraySlice;
82 break;
83
84 case D3D11_RTV_DIMENSION_TEXTURE2D:
85 mipSlice = rtvDesc.Texture2D.MipSlice;
86 arraySlice = 0;
87 break;
88
89 case D3D11_RTV_DIMENSION_TEXTURE2DARRAY:
90 mipSlice = rtvDesc.Texture2DArray.MipSlice;
91 arraySlice = rtvDesc.Texture2DArray.FirstArraySlice;
92 break;
93
94 case D3D11_RTV_DIMENSION_TEXTURE2DMS:
95 mipSlice = 0;
96 arraySlice = 0;
97 break;
98
99 case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY:
100 mipSlice = 0;
101 arraySlice = rtvDesc.Texture2DMSArray.FirstArraySlice;
102 break;
103
104 case D3D11_RTV_DIMENSION_TEXTURE3D:
105 mipSlice = rtvDesc.Texture3D.MipSlice;
106 arraySlice = 0;
107 break;
108
109 case D3D11_RTV_DIMENSION_UNKNOWN:
110 case D3D11_RTV_DIMENSION_BUFFER:
111 UNIMPLEMENTED();
112 break;
113
114 default:
115 UNREACHABLE();
116 break;
117 }
118
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000119 unsigned int mipLevels, samples;
120 getTextureProperties(resource, &mipLevels, &samples);
121
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +0000122 return D3D11CalcSubresource(mipSlice, arraySlice, mipLevels);
123}
124
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000125static unsigned int getDSVSubresourceIndex(ID3D11Resource *resource, ID3D11DepthStencilView *view)
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +0000126{
127 D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc;
128 view->GetDesc(&dsvDesc);
129
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +0000130 unsigned int mipSlice = 0;
131 unsigned int arraySlice = 0;
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +0000132
133 switch (dsvDesc.ViewDimension)
134 {
135 case D3D11_DSV_DIMENSION_TEXTURE1D:
136 mipSlice = dsvDesc.Texture1D.MipSlice;
137 arraySlice = 0;
138 break;
139
140 case D3D11_DSV_DIMENSION_TEXTURE1DARRAY:
141 mipSlice = dsvDesc.Texture1DArray.MipSlice;
142 arraySlice = dsvDesc.Texture1DArray.FirstArraySlice;
143 break;
144
145 case D3D11_DSV_DIMENSION_TEXTURE2D:
146 mipSlice = dsvDesc.Texture2D.MipSlice;
147 arraySlice = 0;
148 break;
149
150 case D3D11_DSV_DIMENSION_TEXTURE2DARRAY:
151 mipSlice = dsvDesc.Texture2DArray.MipSlice;
152 arraySlice = dsvDesc.Texture2DArray.FirstArraySlice;
153 break;
154
155 case D3D11_DSV_DIMENSION_TEXTURE2DMS:
156 mipSlice = 0;
157 arraySlice = 0;
158 break;
159
160 case D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY:
161 mipSlice = 0;
162 arraySlice = dsvDesc.Texture2DMSArray.FirstArraySlice;
163 break;
164
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000165 case D3D11_DSV_DIMENSION_UNKNOWN:
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +0000166 UNIMPLEMENTED();
167 break;
168
169 default:
170 UNREACHABLE();
171 break;
172 }
173
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000174 unsigned int mipLevels, samples;
175 getTextureProperties(resource, &mipLevels, &samples);
176
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +0000177 return D3D11CalcSubresource(mipSlice, arraySlice, mipLevels);
178}
179
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000180RenderTarget11::RenderTarget11(Renderer *renderer, ID3D11RenderTargetView *rtv, ID3D11Resource *resource, ID3D11ShaderResourceView *srv, GLsizei width, GLsizei height)
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000181{
182 mRenderer = Renderer11::makeRenderer11(renderer);
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000183 mTexture = resource;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000184 mRenderTarget = rtv;
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000185 mDepthStencil = NULL;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000186 mShaderResource = srv;
shannon.woods@transgaming.com3e3da582013-02-28 23:09:03 +0000187 mSubresourceIndex = 0;
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000188
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000189 if (mRenderTarget && mTexture)
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000190 {
191 D3D11_RENDER_TARGET_VIEW_DESC desc;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000192 mRenderTarget->GetDesc(&desc);
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000193
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000194 unsigned int mipLevels, samples;
195 getTextureProperties(mTexture, &mipLevels, &samples);
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000196
197 mSubresourceIndex = getRTVSubresourceIndex(mTexture, mRenderTarget);
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000198 mWidth = width;
199 mHeight = height;
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000200 mSamples = samples;
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +0000201
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000202 mInternalFormat = d3d11_gl::ConvertTextureInternalFormat(desc.Format);
203 mActualFormat = d3d11_gl::ConvertTextureInternalFormat(desc.Format);
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000204 }
205}
206
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000207RenderTarget11::RenderTarget11(Renderer *renderer, ID3D11DepthStencilView *dsv, ID3D11Resource *resource, ID3D11ShaderResourceView *srv, GLsizei width, GLsizei height)
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000208{
209 mRenderer = Renderer11::makeRenderer11(renderer);
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000210 mTexture = resource;
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000211 mRenderTarget = NULL;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000212 mDepthStencil = dsv;
213 mShaderResource = srv;
shannon.woods@transgaming.com3e3da582013-02-28 23:09:03 +0000214 mSubresourceIndex = 0;
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000215
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000216 if (mDepthStencil && mTexture)
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000217 {
218 D3D11_DEPTH_STENCIL_VIEW_DESC desc;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000219 mDepthStencil->GetDesc(&desc);
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000220
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000221 unsigned int mipLevels, samples;
222 getTextureProperties(mTexture, &mipLevels, &samples);
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000223
224 mSubresourceIndex = getDSVSubresourceIndex(mTexture, mDepthStencil);
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000225 mWidth = width;
226 mHeight = height;
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000227 mSamples = samples;
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +0000228
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000229 mInternalFormat = d3d11_gl::ConvertTextureInternalFormat(desc.Format);
230 mActualFormat = d3d11_gl::ConvertTextureInternalFormat(desc.Format);
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000231 }
232}
233
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000234RenderTarget11::RenderTarget11(Renderer *renderer, GLsizei width, GLsizei height, GLenum format, GLsizei samples, bool depth)
235{
236 mRenderer = Renderer11::makeRenderer11(renderer);
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000237 mTexture = NULL;
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000238 mRenderTarget = NULL;
239 mDepthStencil = NULL;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000240 mShaderResource = NULL;
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000241
242 DXGI_FORMAT requestedFormat = gl_d3d11::ConvertRenderbufferFormat(format);
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000243
shannon.woods@transgaming.comae84f732013-02-28 23:05:57 +0000244 int supportedSamples = mRenderer->getNearestSupportedSamples(requestedFormat, samples);
245 if (supportedSamples < 0)
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000246 {
shannon.woods@transgaming.com779aa262013-02-28 23:04:58 +0000247 gl::error(GL_OUT_OF_MEMORY);
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000248 return;
249 }
250
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000251 if (width > 0 && height > 0)
252 {
253 // Create texture resource
254 D3D11_TEXTURE2D_DESC desc;
255 desc.Width = width;
256 desc.Height = height;
257 desc.MipLevels = 1;
258 desc.ArraySize = 1;
259 desc.Format = requestedFormat;
shannon.woods@transgaming.comae84f732013-02-28 23:05:57 +0000260 desc.SampleDesc.Count = (supportedSamples == 0) ? 1 : supportedSamples;
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000261 desc.SampleDesc.Quality = 0;
262 desc.Usage = D3D11_USAGE_DEFAULT;
263 desc.CPUAccessFlags = 0;
264 desc.MiscFlags = 0;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000265 desc.BindFlags = (depth ? D3D11_BIND_DEPTH_STENCIL : (D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE));
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000266
267 ID3D11Device *device = mRenderer->getDevice();
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000268 ID3D11Texture2D *texture = NULL;
269 HRESULT result = device->CreateTexture2D(&desc, NULL, &texture);
270 mTexture = texture;
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000271
shannon.woods@transgaming.com8d8814b2013-02-28 23:10:53 +0000272 if (result == E_OUTOFMEMORY)
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000273 {
shannon.woods@transgaming.com779aa262013-02-28 23:04:58 +0000274 gl::error(GL_OUT_OF_MEMORY);
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000275 return;
276 }
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000277 ASSERT(SUCCEEDED(result));
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000278
279 if (depth)
280 {
281 D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc;
282 dsvDesc.Format = requestedFormat;
shannon.woods@transgaming.comae84f732013-02-28 23:05:57 +0000283 dsvDesc.ViewDimension = (supportedSamples == 0) ? D3D11_DSV_DIMENSION_TEXTURE2D : D3D11_DSV_DIMENSION_TEXTURE2DMS;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000284 dsvDesc.Texture2D.MipSlice = 0;
285 dsvDesc.Flags = 0;
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000286 result = device->CreateDepthStencilView(mTexture, &dsvDesc, &mDepthStencil);
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000287
shannon.woods@transgaming.com8d8814b2013-02-28 23:10:53 +0000288 if (result == E_OUTOFMEMORY)
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000289 {
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000290 mTexture->Release();
291 mTexture = NULL;
shannon.woods@transgaming.com779aa262013-02-28 23:04:58 +0000292 gl::error(GL_OUT_OF_MEMORY);
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000293 }
294 ASSERT(SUCCEEDED(result));
295 }
296 else
297 {
298 D3D11_RENDER_TARGET_VIEW_DESC rtvDesc;
299 rtvDesc.Format = requestedFormat;
shannon.woods@transgaming.comae84f732013-02-28 23:05:57 +0000300 rtvDesc.ViewDimension = (supportedSamples == 0) ? D3D11_RTV_DIMENSION_TEXTURE2D : D3D11_RTV_DIMENSION_TEXTURE2DMS;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000301 rtvDesc.Texture2D.MipSlice = 0;
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000302 result = device->CreateRenderTargetView(mTexture, &rtvDesc, &mRenderTarget);
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000303
shannon.woods@transgaming.com8d8814b2013-02-28 23:10:53 +0000304 if (result == E_OUTOFMEMORY)
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000305 {
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000306 mTexture->Release();
307 mTexture = NULL;
shannon.woods@transgaming.com779aa262013-02-28 23:04:58 +0000308 gl::error(GL_OUT_OF_MEMORY);
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000309 return;
310 }
311 ASSERT(SUCCEEDED(result));
312
313 D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;
314 srvDesc.Format = requestedFormat;
shannon.woods@transgaming.comae84f732013-02-28 23:05:57 +0000315 srvDesc.ViewDimension = (supportedSamples == 0) ? D3D11_SRV_DIMENSION_TEXTURE2D : D3D11_SRV_DIMENSION_TEXTURE2DMS;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000316 srvDesc.Texture2D.MostDetailedMip = 0;
317 srvDesc.Texture2D.MipLevels = 1;
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000318 result = device->CreateShaderResourceView(mTexture, &srvDesc, &mShaderResource);
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000319
shannon.woods@transgaming.com8d8814b2013-02-28 23:10:53 +0000320 if (result == E_OUTOFMEMORY)
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000321 {
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000322 mTexture->Release();
323 mTexture = NULL;
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000324 mRenderTarget->Release();
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000325 mRenderTarget = NULL;
shannon.woods@transgaming.com779aa262013-02-28 23:04:58 +0000326 gl::error(GL_OUT_OF_MEMORY);
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000327 return;
328 }
329 ASSERT(SUCCEEDED(result));
330 }
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000331 }
332
333 mWidth = width;
334 mHeight = height;
335 mInternalFormat = format;
336 mSamples = supportedSamples;
shannon.woods@transgaming.comb3f4be02013-02-28 23:05:52 +0000337 mActualFormat = d3d11_gl::ConvertTextureInternalFormat(requestedFormat);
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +0000338 mSubresourceIndex = D3D11CalcSubresource(0, 0, 1);
daniel@transgaming.comc9a501d2013-01-11 04:08:46 +0000339}
340
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000341RenderTarget11::~RenderTarget11()
342{
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000343 if (mTexture)
344 {
345 mTexture->Release();
346 mTexture = NULL;
347 }
348
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000349 if (mRenderTarget)
350 {
351 mRenderTarget->Release();
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000352 mRenderTarget = NULL;
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000353 }
354
355 if (mDepthStencil)
356 {
357 mDepthStencil->Release();
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000358 mDepthStencil = NULL;
359 }
360
361 if (mShaderResource)
362 {
363 mShaderResource->Release();
364 mShaderResource = NULL;
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000365 }
366}
367
368RenderTarget11 *RenderTarget11::makeRenderTarget11(RenderTarget *target)
369{
apatrick@chromium.org8b400b12013-01-30 21:53:40 +0000370 ASSERT(HAS_DYNAMIC_TYPE(rx::RenderTarget11*, target));
daniel@transgaming.comb6b27bc2012-11-28 20:54:30 +0000371 return static_cast<rx::RenderTarget11*>(target);
372}
373
shannon.woods%transgaming.com@gtempaccount.com27ac40e2013-04-13 03:43:17 +0000374ID3D11Resource *RenderTarget11::getTexture() const
shannon.woods@transgaming.com7e232852013-02-28 23:06:15 +0000375{
376 if (mTexture)
377 {
378 mTexture->AddRef();
379 }
380
381 return mTexture;
382}
383
daniel@transgaming.com816c7f32012-11-28 21:02:01 +0000384// Adds reference, caller must call Release
385ID3D11RenderTargetView *RenderTarget11::getRenderTargetView() const
386{
387 if (mRenderTarget)
388 {
389 mRenderTarget->AddRef();
390 }
391
392 return mRenderTarget;
393}
394
395// Adds reference, caller must call Release
396ID3D11DepthStencilView *RenderTarget11::getDepthStencilView() const
397{
398 if (mDepthStencil)
399 {
400 mDepthStencil->AddRef();
401 }
402
403 return mDepthStencil;
404}
405
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000406// Adds reference, caller must call Release
407ID3D11ShaderResourceView *RenderTarget11::getShaderResourceView() const
408{
409 if (mShaderResource)
410 {
411 mShaderResource->AddRef();
412 }
413
414 return mShaderResource;
415}
416
daniel@transgaming.comb68d2bb2013-01-11 04:10:15 +0000417unsigned int RenderTarget11::getSubresourceIndex() const
418{
419 return mSubresourceIndex;
420}
421
shannon.woods@transgaming.com183408d2013-01-25 21:50:07 +0000422}