diff --git a/.pick_status.json b/.pick_status.json index d641107eb46..0fb973f8421 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -134,7 +134,7 @@ "description": "mesa: relax EXT_texture_integer validation", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "705978e2831eb8b8bb23bd11ee08ce51d9b2915c", "notes": null diff --git a/src/mesa/main/draw_validate.c b/src/mesa/main/draw_validate.c index 9e77284c3f9..b2957297cce 100644 --- a/src/mesa/main/draw_validate.c +++ b/src/mesa/main/draw_validate.c @@ -155,8 +155,16 @@ _mesa_update_valid_to_render_state(struct gl_context *ctx) /* If drawing to integer-valued color buffers, there must be an * active fragment shader (GL_EXT_texture_integer). */ - if (ctx->DrawBuffer->_IntegerBuffers) - return; + if (ctx->DrawBuffer->_IntegerBuffers) { + for (int i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) { + gl_buffer_index buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[i]; + if (buf < BUFFER_COLOR0) + continue; + + if (ctx->DrawBuffer->_IntegerBuffers & (1 << (buf - BUFFER_COLOR0))) + return; + } + } } }