mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 00:28:51 +02:00
i965: Drop separate stencil assertions in update_draw_buffer().
The comment said they deserved to be in emit_depthbuffer, and at this point they were all there already. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
7eb0aa398b
commit
3f41f7d1a0
1 changed files with 0 additions and 16 deletions
|
|
@ -95,16 +95,12 @@ brw_update_draw_buffer(struct intel_context *intel)
|
||||||
{
|
{
|
||||||
struct gl_context *ctx = &intel->ctx;
|
struct gl_context *ctx = &intel->ctx;
|
||||||
struct gl_framebuffer *fb = ctx->DrawBuffer;
|
struct gl_framebuffer *fb = ctx->DrawBuffer;
|
||||||
struct intel_renderbuffer *irbStencil = NULL;
|
|
||||||
bool fb_has_hiz = intel_framebuffer_has_hiz(fb);
|
|
||||||
|
|
||||||
if (!fb) {
|
if (!fb) {
|
||||||
/* this can happen during the initial context initialization */
|
/* this can happen during the initial context initialization */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
irbStencil = intel_get_renderbuffer(fb, BUFFER_STENCIL);
|
|
||||||
|
|
||||||
/* Do this here, not core Mesa, since this function is called from
|
/* Do this here, not core Mesa, since this function is called from
|
||||||
* many places within the driver.
|
* many places within the driver.
|
||||||
*/
|
*/
|
||||||
|
|
@ -123,18 +119,6 @@ brw_update_draw_buffer(struct intel_context *intel)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check some stencil invariants. These should probably be in
|
|
||||||
* emit_depthbuffer().
|
|
||||||
*/
|
|
||||||
if (irbStencil && irbStencil->mt) {
|
|
||||||
if (!intel->has_separate_stencil)
|
|
||||||
assert(irbStencil->Base.Format == MESA_FORMAT_S8_Z24);
|
|
||||||
if (fb_has_hiz || intel->must_use_separate_stencil)
|
|
||||||
assert(irbStencil->Base.Format == MESA_FORMAT_S8);
|
|
||||||
if (irbStencil->Base.Format == MESA_FORMAT_S8)
|
|
||||||
assert(intel->has_separate_stencil);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Mesa's Stencil._Enabled field is updated when
|
/* Mesa's Stencil._Enabled field is updated when
|
||||||
* _NEW_BUFFERS | _NEW_STENCIL, but i965 code assumes that the value
|
* _NEW_BUFFERS | _NEW_STENCIL, but i965 code assumes that the value
|
||||||
* only changes with _NEW_STENCIL (which seems sensible). So flag it
|
* only changes with _NEW_STENCIL (which seems sensible). So flag it
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue