Re: [x11drv] d3d stencil support

2005-07-04 Thread Adam D. Moss

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



Re: [x11drv] d3d stencil support

2005-07-04 Thread Frank Richter
On 04.07.2005 02:21, Oliver Stieber wrote:
 Hi,
 This patch makes sure that the OpenGL visual created
 for a window has a stencil buffer.
 This is a requirement for stencil buffer support in d3d.

Hm, isn't it possible that on some pathetic hardware or when lower color
depths are used (e.g. 16bpp) stencil is not supported and that software
emulation instead of hardware acceleration may be used? Wouldn't it be
better to somehow query for a stencil buffer only when really needed?
Just a thought.

-f.r.




Re: [x11drv] d3d stencil support

2005-07-04 Thread Oliver Stieber

--- Frank Richter [EMAIL PROTECTED] wrote:

 On 04.07.2005 02:21, Oliver Stieber wrote:
  Hi,
  This patch makes sure that the OpenGL visual
 created
  for a window has a stencil buffer.
  This is a requirement for stencil buffer support
 in d3d.
 
 Hm, isn't it possible that on some pathetic hardware
 or when lower color
 depths are used (e.g. 16bpp) stencil is not
 supported and that software
 emulation instead of hardware acceleration may be
 used? Wouldn't it be
 better to somehow query for a stencil buffer only
 when really needed?
 Just a thought.
 

OpenGL requires that a stencil is supported for at
least on of the modes, the problem with creating a
stencil buffer only when needed is that the windows
and hence the visual ID is created before directx is
loaded and I don't think that directx should be
messing with anything that's come out of x11drv just
incase it causes regression somewhere else.

There it should only be the additional memory  usage
that causes a negitive impact on performance if the
driver uses software for stencil buffers and the
stencil buffer isn't used.

 -f.r.
 
 
 




___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com



Re: [x11drv] d3d stencil support

2005-07-04 Thread Oliver Stieber
--- Adam D. Moss [EMAIL PROTECTED] 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



Re: [x11drv] d3d stencil support

2005-07-04 Thread Jakob Eriksson

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




Re: [x11drv] d3d stencil support

2005-07-04 Thread Adam D. Moss

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




Re: [x11drv] d3d stencil support

2005-07-04 Thread Oliver Stieber

--- Adam D. Moss [EMAIL PROTECTED] 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/directx/graphics/programmingguide/advancedtopics/stencilbuffer/dissolvesfadesandswipes.asp


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