<div dir="ltr"><div>This and precursor patches<br><br></div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 19, 2017 at 12:43 PM, Topi Pohjolainen <span dir="ltr"><<a href="mailto:topi.pohjolainen@gmail.com" target="_blank">topi.pohjolainen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">v2 (Jason):<br>
- Don't trigger miptree re-creation in vain later on with ISL<br>
based. Core GL uses zero to indicate single sampled while<br>
ISL uses one - this would cause intel_miptree_match_image()<br>
to always fail.<br>
- Now that native miptree is already using sample number of<br>
one, there is no need for MAX2() when converting to ISL.<br>
<br>
Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> (v1)<br>
Reviewed-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> (v1)<br>
<span class="">Signed-off-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
---<br>
src/mesa/drivers/dri/i965/brw_<wbr>blorp.c | 16 ++++-----<br>
src/mesa/drivers/dri/i965/brw_<wbr>context.c | 2 +-<br>
src/mesa/drivers/dri/i965/brw_<wbr>meta_util.c | 2 +-<br>
src/mesa/drivers/dri/i965/brw_<wbr>tex_layout.c | 4 +--<br>
src/mesa/drivers/dri/i965/brw_<wbr>wm.c | 4 +--<br>
src/mesa/drivers/dri/i965/brw_<wbr>wm_surface_state.c | 2 +-<br>
src/mesa/drivers/dri/i965/<wbr>intel_blit.c | 4 +--<br>
src/mesa/drivers/dri/i965/<wbr>intel_fbo.c | 4 +--<br>
src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 46 ++++++++++++------------<br>
src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h | 6 ----<br>
src/mesa/drivers/dri/i965/<wbr>intel_pixel_copy.c | 2 +-<br>
11 files changed, 43 insertions(+), 49 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c b/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
</span>index 2776872d92..474dfc61c1 100644<br>
<span class="">--- a/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
@@ -135,7 +135,7 @@ blorp_surf_for_miptree(struct brw_context *brw,<br>
struct isl_surf tmp_surfs[1])<br>
{<br>
if (mt->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY) {<br>
</span>- const unsigned num_samples = mt->num_samples;<br>
+ const unsigned num_samples = mt->surf.samples;<br>
<div><div class="h5"> for (unsigned i = 0; i < num_layers; i++) {<br>
for (unsigned s = 0; s < num_samples; s++) {<br>
const unsigned phys_layer = (start_layer + i) * num_samples + s;<br>
@@ -275,7 +275,7 @@ swizzle_to_scs(GLenum swizzle)<br>
* Note: if the src (or dst) is a 2D multisample array texture on Gen7+ using<br>
* INTEL_MSAA_LAYOUT_UMS or INTEL_MSAA_LAYOUT_CMS, src_layer (dst_layer) is<br>
* the physical layer holding sample 0. So, for example, if<br>
- * src_mt->num_samples == 4, then logical layer n corresponds to src_layer ==<br>
+ * src_mt->surf.samples == 4, then logical layer n corresponds to src_layer ==<br>
* 4*n.<br>
*/<br>
void<br>
@@ -296,9 +296,9 @@ brw_blorp_blit_miptrees(struct brw_context *brw,<br>
DBG("%s from %dx %s mt %p %d %d (%f,%f) (%f,%f)"<br>
"to %dx %s mt %p %d %d (%f,%f) (%f,%f) (flip %d,%d)\n",<br>
__func__,<br>
- src_mt->num_samples, _mesa_get_format_name(src_mt-><wbr>format), src_mt,<br>
+ src_mt->surf.samples, _mesa_get_format_name(src_mt-><wbr>format), src_mt,<br>
src_level, src_layer, src_x0, src_y0, src_x1, src_y1,<br>
- dst_mt->num_samples, _mesa_get_format_name(dst_mt-><wbr>format), dst_mt,<br>
+ dst_mt->surf.samples, _mesa_get_format_name(dst_mt-><wbr>format), dst_mt,<br>
dst_level, dst_layer, dst_x0, dst_y0, dst_x1, dst_y1,<br>
mirror_x, mirror_y);<br>
<br>
@@ -318,7 +318,7 @@ brw_blorp_blit_miptrees(struct brw_context *brw,<br>
* R32_FLOAT, so only the contents of the red channel matters.<br>
*/<br>
if (brw->gen == 6 &&<br>
- src_mt->num_samples > 1 && dst_mt->num_samples <= 1 &&<br>
+ src_mt->surf.samples > 1 && dst_mt->surf.samples <= 1 &&<br>
src_mt->format == dst_mt->format &&<br>
(dst_format == MESA_FORMAT_L_FLOAT32 ||<br>
dst_format == MESA_FORMAT_I_FLOAT32)) {<br>
@@ -375,9 +375,9 @@ brw_blorp_copy_miptrees(struct brw_context *brw,<br>
DBG("%s from %dx %s mt %p %d %d (%d,%d) %dx%d"<br>
"to %dx %s mt %p %d %d (%d,%d)\n",<br>
__func__,<br>
- src_mt->num_samples, _mesa_get_format_name(src_mt-><wbr>format), src_mt,<br>
+ src_mt->surf.samples, _mesa_get_format_name(src_mt-><wbr>format), src_mt,<br>
src_level, src_layer, src_x, src_y, src_width, src_height,<br>
- dst_mt->num_samples, _mesa_get_format_name(dst_mt-><wbr>format), dst_mt,<br>
+ dst_mt->surf.samples, _mesa_get_format_name(dst_mt-><wbr>format), dst_mt,<br>
dst_level, dst_layer, dst_x, dst_y);<br>
<br>
struct isl_surf tmp_surfs[2];<br>
@@ -564,7 +564,7 @@ brw_blorp_copytexsubimage(<wbr>struct brw_context *brw,<br>
struct intel_mipmap_tree *dst_mt = intel_image->mt;<br>
<br>
/* There is support for only up to eight samples. */<br>
- if (src_mt->num_samples > 8 || dst_mt->num_samples > 8)<br>
+ if (src_mt->surf.samples > 8 || dst_mt->surf.samples > 8)<br>
return false;<br>
<br>
if (_mesa_get_format_base_format(<wbr>src_rb->Format) !=<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_context.c b/src/mesa/drivers/dri/i965/<wbr>brw_context.c<br>
</div></div>index 303c658543..0ef601d342 100644<br>
<span class="">--- a/src/mesa/drivers/dri/i965/<wbr>brw_context.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_context.c<br>
@@ -1218,7 +1218,7 @@ intel_resolve_for_dri2_flush(<wbr>struct brw_context *brw,<br>
rb = intel_get_renderbuffer(fb, buffers[i]);<br>
if (rb == NULL || rb->mt == NULL)<br>
continue;<br>
</span>- if (rb->mt->num_samples == 1) {<br>
+ if (rb->mt->surf.samples == 1) {<br>
<span class=""> assert(rb->mt_layer == 0 && rb->mt_level == 0 &&<br>
rb->layer_count == 1);<br>
intel_miptree_prepare_access(<wbr>brw, rb->mt, 0, 1, 0, 1, false, false);<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_meta_util.c b/src/mesa/drivers/dri/i965/<wbr>brw_meta_util.c<br>
</span>index 7b5a11811b..ea14f44790 100644<br>
<span class="">--- a/src/mesa/drivers/dri/i965/<wbr>brw_meta_util.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_meta_util.c<br>
@@ -298,7 +298,7 @@ brw_is_color_fast_clear_<wbr>compatible(struct brw_context *brw,<br>
* fast clear because it's very likely to be immediately resolved.<br>
*/<br>
if (brw->gen >= 9 &&<br>
</span>- mt->num_samples == 1 &&<br>
+ mt->surf.samples == 1 &&<br>
<div><div class="h5"> ctx->Color.sRGBEnabled &&<br>
_mesa_get_srgb_format_linear(<wbr>mt->format) != mt->format)<br>
return false;<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_tex_layout.c b/src/mesa/drivers/dri/i965/<wbr>brw_tex_layout.c<br>
index 91e94ee4a0..5be73282dc 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_tex_layout.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_tex_layout.c<br>
@@ -100,7 +100,7 @@ intel_vertical_texture_<wbr>alignment_unit(struct brw_context *brw,<br>
if (brw->gen >= 8)<br>
return 4;<br>
<br>
- if (mt->num_samples > 1)<br>
+ if (mt->surf.samples > 1)<br>
return 4;<br>
<br>
GLenum base_format = _mesa_get_format_base_format(<wbr>mt->format);<br>
@@ -521,7 +521,7 @@ brw_miptree_choose_tiling(<wbr>struct brw_context *brw,<br>
return I915_TILING_NONE;<br>
}<br>
<br>
- if (mt->num_samples > 1) {<br>
+ if (mt->surf.samples > 1) {<br>
/* From p82 of the Sandy Bridge PRM, dw3[1] of SURFACE_STATE ("Tiled<br>
* Surface"):<br>
*<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_wm.c b/src/mesa/drivers/dri/i965/<wbr>brw_wm.c<br>
index 9e1dcee8fd..c9c4504590 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_wm.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_wm.c<br>
@@ -398,12 +398,12 @@ brw_populate_sampler_prog_key_<wbr>data(struct gl_context *ctx,<br>
*/<br>
if (intel_tex->mt->aux_usage == ISL_AUX_USAGE_MCS) {<br>
assert(brw->gen >= 7);<br>
- assert(intel_tex->mt->num_<wbr>samples > 1);<br>
+ assert(intel_tex->mt->surf.<wbr>samples > 1);<br>
assert(intel_tex->mt->mcs_buf)<wbr>;<br>
assert(intel_tex->mt->surf.<wbr>msaa_layout == ISL_MSAA_LAYOUT_ARRAY);<br>
key->compressed_multisample_<wbr>layout_mask |= 1 << s;<br>
<br>
- if (intel_tex->mt->num_samples >= 16) {<br>
+ if (intel_tex->mt->surf.samples >= 16) {<br>
assert(brw->gen >= 9);<br>
key->msaa_16 |= 1 << s;<br>
}<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/<wbr>brw_wm_surface_state.c<br>
index 67dc9d8943..00f0a72b1f 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_wm_surface_state.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_wm_surface_state.c<br>
@@ -1036,7 +1036,7 @@ gen4_update_renderbuffer_<wbr>surface(struct brw_context *brw,<br>
surf[3] = (brw_get_surface_tiling_bits(<wbr>mt->tiling) |<br>
(mt->pitch - 1) << BRW_SURFACE_PITCH_SHIFT);<br>
<br>
- surf[4] = brw_get_surface_num_<wbr>multisamples(mt->num_samples);<br>
+ surf[4] = brw_get_surface_num_<wbr>multisamples(mt->surf.samples)<wbr>;<br>
<br>
assert(brw->has_surface_tile_<wbr>offset || (tile_x == 0 && tile_y == 0));<br>
/* Note that the low bits of these fields are missing, so<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_blit.c b/src/mesa/drivers/dri/i965/<wbr>intel_blit.c<br>
index 2471380a0a..226c4f23b7 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_blit.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_blit.c<br>
@@ -298,7 +298,7 @@ intel_miptree_blit(struct brw_context *brw,<br>
GLenum logicop)<br>
{<br>
/* The blitter doesn't understand multisampling at all. */<br>
- if (src_mt->num_samples > 1 || dst_mt->num_samples > 1)<br>
+ if (src_mt->surf.samples > 1 || dst_mt->surf.samples > 1)<br>
return false;<br>
<br>
/* No sRGB decode or encode is done by the hardware blitter, which is<br>
@@ -371,7 +371,7 @@ intel_miptree_copy(struct brw_context *brw,<br>
uint32_t src_width, uint32_t src_height)<br>
{<br>
/* The blitter doesn't understand multisampling at all. */<br>
- if (src_mt->num_samples > 1 || dst_mt->num_samples > 1)<br>
+ if (src_mt->surf.samples > 1 || dst_mt->surf.samples > 1)<br>
return false;<br>
<br>
if (src_mt->format == MESA_FORMAT_S_UINT8)<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_fbo.c b/src/mesa/drivers/dri/i965/<wbr>intel_fbo.c<br>
</div></div>index b7de49f22e..87dc32673c 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_fbo.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_fbo.c<br>
@@ -533,7 +533,7 @@ intel_renderbuffer_update_<wbr>wrapper(struct brw_context *brw,<br>
irb->mt_layer = layer;<br>
<br>
const unsigned layer_multiplier =<br>
- mt->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY ? mt->num_samples : 1;<br>
+ mt->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY ? mt->surf.samples : 1;<br>
<span class=""><br>
if (!layered) {<br>
irb->layer_count = 1;<br>
</span>@@ -970,7 +970,7 @@ intel_renderbuffer_move_to_<wbr>temp(struct brw_context *brw,<br>
<span class=""> intel_image->base.Base.<wbr>TexFormat,<br>
0, 0,<br>
width, height, 1,<br>
- irb->mt->num_samples,<br>
+ irb->mt->surf.samples,<br>
layout_flags);<br>
<br>
if (!invalidate)<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
</span>index 338e965737..418ec3cf06 100644<br>
<span class="">--- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
@@ -168,7 +168,7 @@ intel_miptree_supports_ccs(<wbr>struct brw_context *brw,<br>
return false;<br>
<br>
/* This function applies only to non-multisampled render targets. */<br>
- if (mt->num_samples > 1)<br>
+ if (mt->surf.samples > 1)<br>
return false;<br>
<br>
/* MCS is only supported for color buffers */<br>
@@ -191,7 +191,7 @@ intel_miptree_supports_ccs(<wbr>struct brw_context *brw,<br>
* accidentally reject a multisampled surface here. We should have<br>
* rejected it earlier by explicitly checking the sample count.<br>
*/<br>
</span>- assert(mt->num_samples == 1);<br>
+ assert(mt->surf.samples == 1);<br>
<span class=""> }<br>
<br>
/* Handle the hardware restrictions...<br>
</span>@@ -384,7 +384,7 @@ intel_miptree_create_layout(<wbr>struct brw_context *brw,<br>
<span class=""> mt->supports_fast_clear = false;<br>
mt->aux_state = NULL;<br>
mt->cpp = _mesa_get_format_bytes(format)<wbr>;<br>
- mt->num_samples = num_samples;<br>
+ mt->surf.samples = num_samples;<br>
mt->compressed = _mesa_is_format_compressed(<wbr>format);<br>
mt->surf.msaa_layout = ISL_MSAA_LAYOUT_NONE;<br>
mt->refcount = 1;<br>
</span>@@ -604,7 +604,7 @@ intel_miptree_choose_aux_<wbr>usage(struct brw_context *brw,<br>
<span class=""> assert(mt->aux_usage == ISL_AUX_USAGE_NONE);<br>
<br>
const unsigned no_flags = 0;<br>
- if (mt->num_samples > 1 && is_mcs_supported(brw, mt->format, no_flags)) {<br>
+ if (mt->surf.samples > 1 && is_mcs_supported(brw, mt->format, no_flags)) {<br>
assert(mt->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY);<br>
mt->aux_usage = ISL_AUX_USAGE_MCS;<br>
} else if (intel_tiling_supports_ccs(<wbr>brw, mt->tiling) &&<br>
</span>@@ -1369,8 +1369,8 @@ intel_miptree_match_image(<wbr>struct intel_mipmap_tree *mt,<br>
<span class=""> }<br>
<br>
int level_depth = mt->level[level].depth;<br>
- if (mt->num_samples > 1 && mt->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY)<br>
- level_depth /= mt->num_samples;<br>
+ if (mt->surf.samples > 1 && mt->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY)<br>
+ level_depth /= mt->surf.samples;<br>
<br>
/* Test image dimensions against the base level image adjusted for<br>
* minification. This will also catch images not present in the<br>
</span>@@ -1383,7 +1383,7 @@ intel_miptree_match_image(<wbr>struct intel_mipmap_tree *mt,<br>
}<br>
<br>
/* Core uses sample number of zero to indicate single-sampled. */<br>
- if (MAX2(image->NumSamples, 1) != mt->num_samples)<br>
+ if (MAX2(image->NumSamples, 1) != mt->surf.samples)<br>
return false;<br>
<br>
return true;<br>
@@ -2004,8 +2004,8 @@ intel_miptree_alloc_aux(struct brw_context *brw,<br>
<span class=""><br>
case ISL_AUX_USAGE_MCS:<br>
assert(_mesa_is_format_color_<wbr>format(mt->format));<br>
- assert(mt->num_samples > 1);<br>
- if (!intel_miptree_alloc_mcs(brw, mt, mt->num_samples))<br>
+ assert(mt->surf.samples > 1);<br>
+ if (!intel_miptree_alloc_mcs(brw, mt, mt->surf.samples))<br>
return false;<br>
return true;<br>
<br>
</span>@@ -2017,7 +2017,7 @@ intel_miptree_alloc_aux(struct brw_context *brw,<br>
<br>
case ISL_AUX_USAGE_CCS_E:<br>
assert(_mesa_is_format_color_<wbr>format(mt->format));<br>
- assert(mt->num_samples == 1);<br>
+ assert(mt->surf.samples == 1);<br>
<span class=""> if (!intel_miptree_alloc_ccs(brw, mt))<br>
return false;<br>
return true;<br>
</span>@@ -2066,7 +2066,7 @@ intel_miptree_sample_with_hiz(<wbr>struct brw_context *brw,<br>
<span class=""> * There is no such blurb for 1D textures, but there is sufficient evidence<br>
* that this is broken on SKL+.<br>
*/<br>
</span>- return (mt->num_samples == 1 &&<br>
+ return (mt->surf.samples == 1 &&<br>
<span class=""> mt->target != GL_TEXTURE_3D &&<br>
mt->target != GL_TEXTURE_1D /* gen9+ restriction */);<br>
}<br>
</span>@@ -2126,7 +2126,7 @@ intel_miptree_check_color_<wbr>resolve(const struct brw_context *brw,<br>
<span class=""> (level == 0 && mt->first_level == 0 && mt->last_level == 0));<br>
<br>
/* Compression of arrayed msaa surfaces is supported. */<br>
- if (mt->num_samples > 1)<br>
+ if (mt->surf.samples > 1)<br>
return;<br>
<br>
/* Fast color clear is supported for non-msaa arrays only on Gen8+. */<br>
</span>@@ -2466,7 +2466,7 @@ intel_miptree_prepare_access(<wbr>struct brw_context *brw,<br>
<span class=""> if (!mt->mcs_buf)<br>
return;<br>
<br>
- if (mt->num_samples > 1) {<br>
+ if (mt->surf.samples > 1) {<br>
/* Nothing to do for MSAA */<br>
assert(aux_supported && fast_clear_supported);<br>
} else {<br>
</span>@@ -2515,7 +2515,7 @@ intel_miptree_finish_write(<wbr>struct brw_context *brw,<br>
<span class=""> if (!mt->mcs_buf)<br>
return;<br>
<br>
- if (mt->num_samples > 1) {<br>
+ if (mt->surf.samples > 1) {<br>
for (uint32_t a = 0; a < num_layers; a++) {<br>
intel_miptree_finish_mcs_<wbr>write(brw, mt, level, start_layer + a,<br>
written_with_aux);<br>
</span>@@ -2547,7 +2547,7 @@ intel_miptree_get_aux_state(<wbr>const struct intel_mipmap_tree *mt,<br>
<span class=""><br>
if (_mesa_is_format_color_format(<wbr>mt->format)) {<br>
assert(mt->mcs_buf != NULL);<br>
</span>- assert(mt->num_samples == 1 ||<br>
+ assert(mt->surf.samples == 1 ||<br>
<span class=""> mt->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY);<br>
} else if (mt->format == MESA_FORMAT_S_UINT8) {<br>
unreachable("Cannot get aux state for stencil");<br>
</span>@@ -2568,7 +2568,7 @@ intel_miptree_set_aux_state(<wbr>struct brw_context *brw,<br>
<span class=""><br>
if (_mesa_is_format_color_format(<wbr>mt->format)) {<br>
assert(mt->mcs_buf != NULL);<br>
</span>- assert(mt->num_samples == 1 ||<br>
+ assert(mt->surf.samples == 1 ||<br>
<span class=""> mt->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY);<br>
} else if (mt->format == MESA_FORMAT_S_UINT8) {<br>
unreachable("Cannot get aux state for stencil");<br>
</span>@@ -2623,7 +2623,7 @@ intel_miptree_prepare_texture_<wbr>slices(struct brw_context *brw,<br>
<span class=""> {<br>
bool aux_supported, clear_supported;<br>
if (_mesa_is_format_color_format(<wbr>mt->format)) {<br>
- if (mt->num_samples > 1) {<br>
+ if (mt->surf.samples > 1) {<br>
aux_supported = clear_supported = true;<br>
} else {<br>
aux_supported = can_texture_with_ccs(brw, mt, view_format);<br>
</span>@@ -2690,7 +2690,7 @@ intel_miptree_prepare_render(<wbr>struct brw_context *brw,<br>
<span class=""> * enabled because otherwise the surface state will be programmed with<br>
* the linear equivalent format anyway.<br>
*/<br>
</span>- if (brw->gen == 9 && srgb_enabled && mt->num_samples == 1 &&<br>
+ if (brw->gen == 9 && srgb_enabled && mt->surf.samples == 1 &&<br>
<span class=""> _mesa_get_srgb_format_linear(<wbr>mt->format) != mt->format) {<br>
<br>
/* Lossless compression is not supported for SRGB formats, it<br>
</span>@@ -2753,7 +2753,7 @@ intel_miptree_make_shareable(<wbr>struct brw_context *brw,<br>
<span class=""> * reached for multisample buffers.<br>
*/<br>
assert(mt->surf.msaa_layout == ISL_MSAA_LAYOUT_NONE ||<br>
</span>- mt->num_samples == 1);<br>
+ mt->surf.samples == 1);<br>
<span class=""><br>
intel_miptree_prepare_access(<wbr>brw, mt, 0, INTEL_REMAINING_LEVELS,<br>
0, INTEL_REMAINING_LAYERS, false, false);<br>
</span>@@ -2931,7 +2931,7 @@ intel_update_r8stencil(struct brw_context *brw,<br>
<span class=""> src->logical_width0,<br>
src->logical_height0,<br>
src->logical_depth0,<br>
- src->num_samples,<br>
+ src->surf.samples,<br>
r8stencil_flags);<br>
assert(mt->r8stencil_mt);<br>
}<br>
</span>@@ -3579,7 +3579,7 @@ intel_miptree_map(struct brw_context *brw,<br>
{<br>
struct intel_miptree_map *map;<br>
<br>
- assert(mt->num_samples == 1 || mt->surf.samples == 1);<br>
+ assert(mt->surf.samples == 1);<br>
<span class=""><br>
map = intel_miptree_attach_map(mt, level, slice, x, y, w, h, mode);<br>
if (!map){<br>
</span>@@ -3625,7 +3625,7 @@ intel_miptree_unmap(struct brw_context *brw,<br>
<span class=""> {<br>
struct intel_miptree_map *map = mt->level[level].slice[slice].<wbr>map;<br>
<br>
</span>- assert(mt->num_samples == 1 || mt->surf.samples == 1);<br>
+ assert(mt->surf.samples == 1);<br>
<br>
if (!map)<br>
return;<br>
@@ -3794,7 +3794,7 @@ intel_miptree_get_isl_surf(<wbr>struct brw_context *brw,<br>
<span class=""> }<br>
<br>
surf->levels = mt->last_level - mt->first_level + 1;<br>
</span>- surf->samples = mt->num_samples;<br>
+ surf->samples = mt->surf.samples;<br>
<div class="HOEnZb"><div class="h5"><br>
surf->size = 0; /* TODO */<br>
surf->alignment = 0; /* TODO */<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
index 89590d2ba2..fde9a022fd 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
@@ -414,12 +414,6 @@ struct intel_mipmap_tree<br>
/** Bytes per pixel (or bytes per block if compressed) */<br>
GLuint cpp;<br>
<br>
- /**<br>
- * @see RENDER_SURFACE_STATE.<wbr>NumberOfMultisamples<br>
- * @see 3DSTATE_MULTISAMPLE.<wbr>NumberOfMultisamples<br>
- */<br>
- GLuint num_samples;<br>
-<br>
bool compressed;<br>
<br>
/**<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_pixel_copy.c b/src/mesa/drivers/dri/i965/<wbr>intel_pixel_copy.c<br>
index 3ffd68c048..3f8df3002f 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_pixel_copy.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_pixel_copy.c<br>
@@ -101,7 +101,7 @@ do_blit_copypixels(struct gl_context * ctx,<br>
return false;<br>
}<br>
<br>
- if (draw_irb->mt->num_samples > 1 || read_irb->mt->num_samples > 1) {<br>
+ if (draw_irb->mt->surf.samples > 1 || read_irb->mt->surf.samples > 1) {<br>
perf_debug("glCopyPixels() fallback: multisampled buffers\n");<br>
return false;<br>
}<br>
--<br>
2.11.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>