On 1 September 2011 11:01, Stefan Dösinger stefan@codeweavers.com wrote:
case 32: if(DDPixelFormat->u2.dwStencilBitDepth == 8) return WINED3DFMT_D24_UNORM_S8_UINT;
else
else if (DDPixelFormat->u2.dwStencilBitDepth == 4) return WINED3DFMT_S4X4_UINT_D24_UNORM;
I'm not sure if this is intentional or not, but you fallthrough to the default case here. If that's intentional, a /* Fallthrough */ or similar comment wouldn't hurt. On the other hand, you do explicitly handle it in the no-stencil case.
On Thursday 01 September 2011 13:27:28 Henri Verbeet wrote:
On 1 September 2011 11:01, Stefan Dösinger stefan@codeweavers.com wrote:
case 32: if(DDPixelFormat->u2.dwStencilBitDepth == 8) return WINED3DFMT_D24_UNORM_S8_UINT;
else
else if (DDPixelFormat->u2.dwStencilBitDepth == 4) return WINED3DFMT_S4X4_UINT_D24_UNORM;
I'm not sure if this is intentional or not, but you fallthrough to the default case here.
It was intentional, but you're right that it is inconsistent.