{
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
- unsigned num_samples = 0;
float coverage = 1.0;
float coverage_invert = false;
+ /* _NEW_BUFFERS */
+ unsigned num_samples = ctx->DrawBuffer->Visual.samples;
+
/* _NEW_MULTISAMPLE */
if (ctx->Multisample._Enabled && ctx->Multisample.SampleCoverage) {
coverage = ctx->Multisample.SampleCoverageValue;
coverage_invert = ctx->Multisample.SampleCoverageInvert;
}
- /* _NEW_BUFFERS */
- if (ctx->DrawBuffer->_ColorDrawBuffers[0])
- num_samples = ctx->DrawBuffer->_ColorDrawBuffers[0]->NumSamples;
-
/* 3DSTATE_MULTISAMPLE is nonpipelined. */
intel_emit_post_sync_nonzero_flush(intel);
int i;
/* _NEW_BUFFER */
bool render_to_fbo = _mesa_is_user_fbo(brw->intel.ctx.DrawBuffer);
- bool multisampled_fbo = false;
- if (ctx->DrawBuffer->_ColorDrawBuffers[0])
- multisampled_fbo = ctx->DrawBuffer->_ColorDrawBuffers[0]->NumSamples > 0;
+ bool multisampled_fbo = ctx->DrawBuffer->Visual.sampleBuffers;
int attr = 0, input_index = 0;
int urb_entry_read_offset = 1;
const struct brw_fragment_program *fp =
brw_fragment_program_const(brw->fragment_program);
uint32_t dw2, dw4, dw5, dw6;
- bool multisampled_fbo = false;
/* _NEW_BUFFERS */
- if (ctx->DrawBuffer->_ColorDrawBuffers[0])
- multisampled_fbo = ctx->DrawBuffer->_ColorDrawBuffers[0]->NumSamples > 0;
+ bool multisampled_fbo = ctx->DrawBuffer->Visual.sampleBuffers;
/* CACHE_NEW_WM_PROG */
if (brw->wm.prog_data->nr_params == 0) {
float point_size;
/* _NEW_BUFFERS */
bool render_to_fbo = _mesa_is_user_fbo(brw->intel.ctx.DrawBuffer);
- bool multisampled_fbo = false;
- if (ctx->DrawBuffer->_ColorDrawBuffers[0])
- multisampled_fbo = ctx->DrawBuffer->_ColorDrawBuffers[0]->NumSamples > 0;
+ bool multisampled_fbo = ctx->DrawBuffer->Visual.sampleBuffers;
dw1 = GEN6_SF_STATISTICS_ENABLE |
GEN6_SF_VIEWPORT_TRANSFORM_ENABLE;
const struct brw_fragment_program *fp =
brw_fragment_program_const(brw->fragment_program);
bool writes_depth = false;
- bool multisampled_fbo = false;
uint32_t dw1, dw2;
/* _NEW_BUFFERS */
- if (ctx->DrawBuffer->_ColorDrawBuffers[0])
- multisampled_fbo = ctx->DrawBuffer->_ColorDrawBuffers[0]->NumSamples > 0;
+ bool multisampled_fbo = ctx->DrawBuffer->Visual.sampleBuffers;
dw1 = dw2 = 0;
dw1 |= GEN7_WM_STATISTICS_ENABLE;