<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi. <br>
</p>
<p><br>
</p>
<p>I was investigating a regression that cause the CheckDeviceFormat function to return
<span>WINED3DERR_NOTAVAILABLE when quering for RESZ surfaces. (WINED3DFMT_RESZ). This is causing OblivionReloaded (that worked properly until wine 2.5) to not work properly (it detect an incompatible hardware in wine or NVIDIA in wine-staging).</span></p>
<p><span><br>
</span></p>
<p><span>I tacked the regression to this commit : <a href="https://github.com/wine-mirror/wine/commit/8c98be4791f18f31b04a4a0f08d18979aa0d06df" class="OWAAutoLink" id="LPlnk105153" previewremoved="true">
https://github.com/wine-mirror/wine/commit/8c98be4791f18f31b04a4a0f08d18979aa0d06df</a></p>
<div id="LPBorder_GT_15041036765520.11592611293308264" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15041036765290.5887521363301994" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" role="presentation" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td id="ImageCell_15041036765340.1276099335691624" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;" colspan="1">
<div id="LPImageContainer_15041036765340.41937162724768506" style="background-color: rgb(255, 255, 255); height: 250px; position: relative; margin: auto; display: table; width: 250px;">
<a id="LPImageAnchor_15041036765370.5224502716373448" style="display: table-cell; text-align: center;" href="https://github.com/wine-mirror/wine/commit/8c98be4791f18f31b04a4a0f08d18979aa0d06df" target="_blank"><img style="display: inline-block; max-width: 250px; max-height: 250px; height: 250px; width: 250px; border-width: 0px; vertical-align: bottom;" id="LPThumbnailImageID_15041036765380.923803169399159" width="250" height="250" src="https://camo.githubusercontent.com/db3db2bf09d082a1f4244859890e83954d8410ab/68747470733a2f2f312e67726176617461722e636f6d2f6176617461722f34313339353630393536343437316339386536313437396538333061383138623f643d68747470732533412532462532466173736574732d63646e2e6769746875622e636f6d253246696d6167657325324667726176617461727325324667726176617461722d757365722d3432302e706e6726723d7826733d323030"></a></div>
</td>
<td id="TextCell_15041036765410.9456734156730484" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" colspan="2">
<div id="LPRemovePreviewContainer_15041036765420.6175316059921808"></div>
<div id="LPTitle_15041036765420.3829272207683506" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: sans-serif, "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial; line-height: 21px;">
<a id="LPUrlAnchor_15041036765430.46660351108865095" style="text-decoration: none;" href="https://github.com/wine-mirror/wine/commit/8c98be4791f18f31b04a4a0f08d18979aa0d06df" target="_blank">wined3d: Allow all formats with "glInternal" set in CheckSurfaceCapab�
 � wine-mirror/wine@8c98be4</a></div>
<div id="LPMetadata_15041036765470.36215358887548565" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: sans-serif, "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial; font-size: 14px; line-height: 14px;">
github.com</div>
<div id="LPDescription_15041036765500.9781035264868412" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: sans-serif, "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
�ility(). Rendertarget, depth/stencil and texturing restrictions are applied later in wined3d_check_device_format(), so to the extent this make a difference it mostly affects off-screen plain surf...</div>
</td>
</tr>
</tbody>
</table>
</div>
I  tried to fix this issue. <br>
</span>
<p></p>
<p><br>
</p>
<p>The last patch I made in my local branch is adding a <span>wined3d_format_texture_info</span> in the
<span>format_texture_info</span> array:</p>
<p><br>
</p>
<p></p>
<div>+    {WINED3DFMT_RESZ,                   GL_DEPTH24_STENCIL8,              GL_DEPTH24_STENCIL8,                    0,<br>
+            GL_DEPTH_STENCIL,           GL_UNSIGNED_INT,                  0,<br>
+            WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL  | WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_FBO_ATTACHABLE,<br>
+            ARB_FRAMEBUFFER_OBJECT,     NULL},</div>
<p></p>
<p><br>
</p>
<p>However I know almost nothing about the internal work of wined3d and opengl and don't know if this kind of addition is correct. OblivionReloaded works and can properly use the RESZ depth texture.
<br>
</p>
<p>I based this patch on the INTZ and RAWZ surfaces that are somewhat reported to be similar in scope in some docs.</p>
<p><br>
</p>
<p>Also I don't know if the flags are correct or even meaningful in this scope. I could not find any documentation about the internal meaning of these flags. As the good Jon Snow  I know nothing.</p>
<p><br>
</p>
<p>Note I never did a patch in wine before (except adding some debug message). So please tell me if I'm in a completly wrong direction.
<br>
</p>
<p>Also note that I didn't run the test suite. Using make test is failing hard on an advapi32 test even without this patch applied.<br>
</p>
<p>I attached the full patch file.<br>
</p>
</div>
</body>
</html>