Re: [x11drv] d3d stencil support
Hi! Oliver Stieber wrote:
+ if (visual == NULL) { + /* fallback to a 1 bit stencil (opengl states that at least 1 bit of stencil must be provided for on of the available configurations) */ + WARN("Failed to get a visual with at least 8 bits of stencil\n"); + int dblBuf2[] = {GLX_RGBA,GLX_DEPTH_SIZE,16,GLX_STENCIL_SIZE,1,GLX_DOUBLEBUFFER,None}; + + wine_tsx11_lock(); + visual = pglXChooseVisual(display, DefaultScreen(display), dblBuf2); + wine_tsx11_unlock(); + if (visual == NULL) { + /* This should only happen if we cannot fidn a match with a depth size 16 */ + FIXME("Failed to find a suitable visual\n"); + } + }
It's always nice to have a fallback, but in real life I've never seen PC hardware (even back to the 90s) which supports a 1-bit stencil buffer and not a 8-bit stencil buffer, so this may be over-redundant. (Would be interested in hearing of any consumer hardware which only does a 1-bit stencil.) Regards, --adam
--- "Adam D. Moss" <aspirin(a)ntlworld.com> wrote:
Hi!
Oliver Stieber wrote:
+ if (visual == NULL) { + /* fallback to a 1 bit stencil (opengl states that at least 1 bit of stencil must be provided for on of the available configurations) */ + WARN("Failed to get a visual with at least 8 bits of stencil\n"); + int dblBuf2[] =
{GLX_RGBA,GLX_DEPTH_SIZE,16,GLX_STENCIL_SIZE,1,GLX_DOUBLEBUFFER,None};
+ + wine_tsx11_lock(); + visual = pglXChooseVisual(display, DefaultScreen(display), dblBuf2); + wine_tsx11_unlock(); + if (visual == NULL) { + /* This should only happen if we cannot fidn a match with a depth size 16 */ + FIXME("Failed to find a suitable visual\n"); + } + }
It's always nice to have a fallback, but in real life I've never seen PC hardware (even back to the 90s) which supports a 1-bit stencil buffer and not a 8-bit stencil buffer, so this may be over-redundant. (Would be interested in hearing of any consumer hardware which only does a 1-bit stencil.)
The fallback is there because 1 bit stencil is the minimum required by the opengl specification, so it is possible that somewhere there is a driver that only supports 1 bit stencil. Oliver.
Regards, --adam
___________________________________________________________ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
Oliver Stieber wrote:
The fallback is there because 1 bit stencil is the minimum required by the opengl specification, so it is possible that somewhere there is a driver that only supports 1 bit stencil.
I understood that, I was simply saying that I don't think there's ever been a consumer graphics card that did only 1-7 bits -- they seem to universally do 0 or 8 bits of stencil (even the software-renderers), so the fallback is likely a waste of breath, though I appreciate caution. Perhaps more to the point, does D3D only guarantee a 1-bit stencil buffer? A 1-bit stencil buffer (most especially one without GL_EXT_stencil_wrap) is of very, very limited use. I somewhat expect that no D3D applications (except maybe, just maybe, some very simple test-apps) will actually operate correctly with a 1-bit unwrapped stencil. Cheers, --adam
--- "Adam D. Moss" <aspirin(a)ntlworld.com> wrote:
Oliver Stieber wrote:
The fallback is there because 1 bit stencil is the minimum required by the opengl specification, so it is possible that somewhere there is a driver that only supports 1 bit stencil.
I understood that, I was simply saying that I don't think there's ever been a consumer graphics card that did only 1-7 bits -- they seem to universally do 0 or 8 bits of stencil (even the software-renderers), so the fallback is likely a waste of breath, though I appreciate caution.
Perhaps more to the point, does D3D only guarantee a 1-bit stencil buffer? A 1-bit stencil buffer (most especially one without GL_EXT_stencil_wrap) is of very, very limited use. I somewhat expect that no D3D applications (except maybe, just maybe, some very simple test-apps) will actually operate correctly with a 1-bit unwrapped stencil.
I haven't come across any yet, but I've mainly been concentrating on d3d9. there's a good chance that some older applications may use a 1bit stencil to speed things up. applications that would generally be regarded as 2d can make use of a 1bit stencil buffer for masks and screen wipes. e.g. http://www.mvps.org/directx/articles/wipe/ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/... I wouldn't expect someone with hardware that doesn't support 8bit+ stencils to be playing the latest games, but there's potential for them to be using other applications that require a simple stencil buffer, or simple 3D an no stencil at all, in which case they require some kind of fallback.
Cheers, --adam
___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
Adam D. Moss wrote:
Hi!
Oliver Stieber wrote:
+ if (visual == NULL) { + /* fallback to a 1 bit stencil (opengl states that at least 1 bit of stencil must be provided for on of the available configurations) */ + WARN("Failed to get a visual with at least 8 bits of stencil\n"); + int dblBuf2[] = {GLX_RGBA,GLX_DEPTH_SIZE,16,GLX_STENCIL_SIZE,1,GLX_DOUBLEBUFFER,None}; + + wine_tsx11_lock(); + visual = pglXChooseVisual(display, DefaultScreen(display), dblBuf2); + wine_tsx11_unlock(); + if (visual == NULL) { + /* This should only happen if we cannot fidn a match with a depth size 16 */ + FIXME("Failed to find a suitable visual\n"); + } + }
It's always nice to have a fallback, but in real life I've never seen PC hardware (even back to the 90s) which supports a 1-bit stencil buffer and not a 8-bit stencil buffer, so this may be over-redundant. (Would be interested in hearing of any consumer hardware which only does a 1-bit stencil.)
Sun ELC. Not exactly consumer hardware though. regards, Jakob
participants (3)
-
Adam D. Moss -
Jakob Eriksson -
Oliver Stieber