projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa: Track buffer object use also for VAO usage.
[mesa.git]
/
src
/
mesa
/
main
/
clear.c
diff --git
a/src/mesa/main/clear.c
b/src/mesa/main/clear.c
index c5e7f1346b0ce2dd2ece269b0dde93ec555d9a3b..6beff9ed842bc7e38a8cd93429c92298b8184c1f 100644
(file)
--- a/
src/mesa/main/clear.c
+++ b/
src/mesa/main/clear.c
@@
-118,7
+118,7
@@
color_buffer_writes_enabled(const struct gl_context *ctx, unsigned idx)
if (rb) {
for (c = 0; c < 4; c++) {
if (rb) {
for (c = 0; c < 4; c++) {
- if (
ctx->Color.ColorMask[idx][c]
&&
+ if (
GET_COLORMASK_BIT(ctx->Color.ColorMask, idx, c)
&&
_mesa_format_has_color_component(rb->Format, c)) {
return true;
}
_mesa_format_has_color_component(rb->Format, c)) {
return true;
}
@@
-194,9
+194,9
@@
clear(struct gl_context *ctx, GLbitfield mask, bool no_error)
if (mask & GL_COLOR_BUFFER_BIT) {
GLuint i;
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
if (mask & GL_COLOR_BUFFER_BIT) {
GLuint i;
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
-
GLint
buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[i];
+
gl_buffer_index
buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[i];
- if (buf
>= 0
&& color_buffer_writes_enabled(ctx, i)) {
+ if (buf
!= BUFFER_NONE
&& color_buffer_writes_enabled(ctx, i)) {
bufferMask |= 1 << buf;
}
}
bufferMask |= 1 << buf;
}
}
@@
-321,9
+321,10
@@
make_color_buffer_mask(struct gl_context *ctx, GLint drawbuffer)
break;
default:
{
break;
default:
{
- GLint buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[drawbuffer];
+ gl_buffer_index buf =
+ ctx->DrawBuffer->_ColorDrawBufferIndexes[drawbuffer];
- if (buf
>= 0
&& att[buf].Renderbuffer) {
+ if (buf
!= BUFFER_NONE
&& att[buf].Renderbuffer) {
mask |= 1 << buf;
}
}
mask |= 1 << buf;
}
}