Is mDepthStencilDirty really needed? It seems like it should be largely redundant to the mAppliedStencilbufferSerial ...
13 years, 8 months ago
(2010-09-14 03:42:44 UTC)
#3
Is mDepthStencilDirty really needed? It seems like it should be largely
redundant to the mAppliedStencilbufferSerial values, particularly since it only
ever toggles to false once.
Failing to initialize mAppliedStencilbufferSerial is certainly a bug though!
The problem was that mAppliedStencilbufferSerial is initialized to zero which means that: device->SetDepthStencilSurface(depthStencil); would never ...
13 years, 8 months ago
(2010-09-14 04:15:22 UTC)
#4
The problem was that mAppliedStencilbufferSerial is initialized to zero which
means that:
device->SetDepthStencilSurface(depthStencil);
would never get called with a NULL value as it should. D3D9 was reporting errors
that the attached depth-stencil buffer didn't match in size with the render
buffer.
On 2010/09/14 03:42:44, dgkoch wrote:
> Is mDepthStencilDirty really needed? It seems like it should be largely
> redundant to the mAppliedStencilbufferSerial values, particularly since it
only
> ever toggles to false once.
>
> Failing to initialize mAppliedStencilbufferSerial is certainly a bug though!
On 2010/09/14 04:15:22, vangelis1 wrote: > The problem was that mAppliedStencilbufferSerial is initialized to zero ...
13 years, 8 months ago
(2010-09-14 04:28:36 UTC)
#5
On 2010/09/14 04:15:22, vangelis1 wrote:
> The problem was that mAppliedStencilbufferSerial is initialized to zero which
> means that:
>
> device->SetDepthStencilSurface(depthStencil);
>
> would never get called with a NULL value as it should. D3D9 was reporting
errors
> that the attached depth-stencil buffer didn't match in size with the render
> buffer.
Ok, I see that now. I guess the other way to fix it would to initialize
mAppliedStencilbufferSerial to -1 or something like that, but obviously that
doesn't work so well as they are 'unsigned int's currently.
I guess my main objection is that the mDepthStencilDirty isn't used the same way
the rest of our "dirty" flags are used. Perhaps it would be clearer if it was
called mDepthStencilInitialized and had the logic reversed?
On 2010/09/14 04:28:36, dgkoch wrote: > On 2010/09/14 04:15:22, vangelis1 wrote: > > The problem ...
13 years, 8 months ago
(2010-09-14 04:46:40 UTC)
#6
On 2010/09/14 04:28:36, dgkoch wrote:
> On 2010/09/14 04:15:22, vangelis1 wrote:
> > The problem was that mAppliedStencilbufferSerial is initialized to zero
which
> > means that:
> >
> > device->SetDepthStencilSurface(depthStencil);
> >
> > would never get called with a NULL value as it should. D3D9 was reporting
> errors
> > that the attached depth-stencil buffer didn't match in size with the render
> > buffer.
>
> Ok, I see that now. I guess the other way to fix it would to initialize
> mAppliedStencilbufferSerial to -1 or something like that, but obviously that
> doesn't work so well as they are 'unsigned int's currently.
funny you should mention that. We did the -1 trick originally but thought it
wasn't very clean so we went with the flag.
>
> I guess my main objection is that the mDepthStencilDirty isn't used the same
way
> the rest of our "dirty" flags are used. Perhaps it would be clearer if it was
> called mDepthStencilInitialized and had the logic reversed?
Fair enough. I'll submit a patch that fixes that tomorrow.
Issue 2184041: Reset DepthStencilSurface after Context::markAllStateDirty() has been called.
(Closed)
Created 13 years, 8 months ago by VangelisK
Modified 13 years, 8 months ago
Reviewers: apatrick, apatrick1, dgkoch
Base URL: http://angleproject.googlecode.com/svn/trunk/
Comments: 0