@@ -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