OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2109ba4
)
gallium: in clear_stencil_buffer() check surface format to determine stencil clear...
author
Brian
<brian.paul@tungstengraphics.com>
Thu, 13 Mar 2008 00:24:46 +0000
(18:24 -0600)
committer
Brian
<brian.paul@tungstengraphics.com>
Thu, 13 Mar 2008 00:24:46 +0000
(18:24 -0600)
... as we do for the Z and Z+stencil cases
src/mesa/state_tracker/st_cb_clear.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_cb_clear.c
b/src/mesa/state_tracker/st_cb_clear.c
index
eae40f2
..
cc8a136
100644
(file)
--- a/
src/mesa/state_tracker/st_cb_clear.c
+++ b/
src/mesa/state_tracker/st_cb_clear.c
@@
-544,6
+544,15
@@
clear_stencil_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
/* simple clear of whole buffer */
GLuint clearValue = ctx->Stencil.Clear;
+
+ switch (strb->surface->format) {
+ case PIPE_FORMAT_S8Z24_UNORM:
+ clearValue <<= 24;
+ break;
+ default:
+ ; /* no-op, stencil value is in least significant bits */
+ }
+
ctx->st->pipe->clear(ctx->st->pipe, strb->surface, clearValue);
}
}