Skip to content

Commit 89393a9

Browse files
committed
xrRenderDX10/dx10SH_RT.cpp: cleanup
Also I've added a TODO there..
1 parent 0e4314e commit 89393a9

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

src/Layers/xrRender/SH_RT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void CRT::create(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 /*SampleCount*/)
8080
if (FAILED(_hr) || (0 == pSurface))
8181
return;
8282

83-
// OK
83+
// OK
8484
#ifdef DEBUG
8585
Msg("* created RT(%s), %dx%d", Name, w, h);
8686
#endif // DEBUG

src/Layers/xrRenderDX10/dx10SH_RT.cpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ void CRT::create(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 SampleCount)
4040
dwHeight = h;
4141
fmt = f;
4242

43-
// Get caps
44-
// D3DCAPS9 caps;
45-
// R_CHK (HW.pDevice->GetDeviceCaps(&caps));
46-
4743
// DirectX 10 supports non-power of two textures
4844
// Pow2
4945
// if (!btwIsPow2(w) || !btwIsPow2(h))
@@ -82,19 +78,11 @@ void CRT::create(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 SampleCount)
8278
usage = D3DUSAGE_DEPTHSTENCIL;
8379
break;
8480

85-
case D3DFMT_D32:
86-
VERIFY(false, "What? How this happen?");
87-
[[fallthrough]];
88-
8981
case D3DFMT_D32F_LOCKABLE:
9082
dx10FMT = DXGI_FORMAT_R32_TYPELESS;
9183
usage = D3DUSAGE_DEPTHSTENCIL;
9284
break;
9385

94-
case D3DFMT_D16:
95-
VERIFY(false, "What? How this happen?");
96-
[[fallthrough]];
97-
9886
case D3DFMT_D16_LOCKABLE:
9987
dx10FMT = DXGI_FORMAT_R16_TYPELESS;
10088
usage = D3DUSAGE_DEPTHSTENCIL;
@@ -120,8 +108,6 @@ void CRT::create(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 SampleCount)
120108

121109
// Try to create texture/surface
122110
RImplementation.Resources->Evict();
123-
//_hr = HW.pDevice->CreateTexture (w, h, 1, usage, f, D3DPOOL_DEFAULT, &pSurface,NULL);
124-
// if (FAILED(_hr) || (0==pSurface)) return;
125111

126112
// Create the render target texture
127113
D3D_TEXTURE2D_DESC desc;
@@ -151,11 +137,11 @@ void CRT::create(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 SampleCount)
151137

152138
CHK_DX(HW.pDevice->CreateTexture2D(&desc, NULL, &pSurface));
153139
HW.stats_manager.increment_stats_rtarget(pSurface);
154-
// OK
140+
// OK
155141
#ifdef DEBUG
156142
Msg("* created RT(%s), %dx%d, format = %d samples = %d", Name, w, h, dx10FMT, SampleCount);
157143
#endif // DEBUG
158-
// R_CHK (pSurface->GetSurfaceLevel (0,&pRT));
144+
// R_CHK (pSurface->GetSurfaceLevel (0,&pRT)); // TODO: DX10: check if texture is created?
159145
if (useAsDepth)
160146
{
161147
D3D_DEPTH_STENCIL_VIEW_DESC ViewDesc;

0 commit comments

Comments
 (0)