mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
i965/msaa: Enable 4x MSAA on Gen7.
Basic 4x MSAA support now works on Gen7. This patch enables it. As with Gen6, MSAA support is still fairly preliminary. In particular, the following are not yet supported: - 8x oversampling (Gen7 has hardware support for this, but we do not yet expose it). - Fully general blits between MSAA and non-MSAA buffers. - Formats other than RGBA8, DEPTH24, and STENCIL8. - Centrold interpolation. - Coverage parameters (glSampleCoverage, GL_SAMPLE_ALPHA_TO_COVERAGE, GL_SAMPLE_ALPHA_TO_ONE, GL_SAMPLE_COVERAGE, GL_SAMPLE_COVERAGE_VALUE, GL_SAMPLE_COVERAGE_INVERT). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
4725ba03ca
commit
ab014adaed
2 changed files with 9 additions and 9 deletions
|
|
@ -36,10 +36,8 @@ gen6_emit_3dstate_multisample(struct brw_context *brw,
|
|||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
|
||||
/* TODO: MSAA only implemented on Gen6 */
|
||||
if (intel->gen != 6) {
|
||||
assert(num_samples == 0);
|
||||
}
|
||||
/* TODO: 8x MSAA not implemented */
|
||||
assert(num_samples <= 4);
|
||||
|
||||
int len = intel->gen >= 7 ? 4 : 3;
|
||||
BEGIN_BATCH(len);
|
||||
|
|
@ -62,10 +60,8 @@ gen6_emit_3dstate_sample_mask(struct brw_context *brw,
|
|||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
|
||||
/* TODO: MSAA only implemented on Gen6 */
|
||||
if (intel->gen != 6) {
|
||||
assert(num_samples == 0);
|
||||
}
|
||||
/* TODO: 8x MSAA not implemented */
|
||||
assert(num_samples <= 4);
|
||||
|
||||
BEGIN_BATCH(2);
|
||||
OUT_BATCH(_3DSTATE_SAMPLE_MASK << 16 | (2 - 2));
|
||||
|
|
|
|||
|
|
@ -202,7 +202,11 @@ quantize_num_samples(struct intel_context *intel, unsigned num_samples)
|
|||
else
|
||||
return 0;
|
||||
case 7:
|
||||
/* TODO: MSAA only implemented on Gen6 */
|
||||
/* TODO: Gen7 supports only 4x multisampling at the moment. */
|
||||
if (num_samples > 0)
|
||||
return 4;
|
||||
else
|
||||
return 0;
|
||||
return 0;
|
||||
default:
|
||||
/* MSAA unsupported */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue