<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 18, 2017 at 1:46 AM, 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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>
index be310de85b..be0d41b04a 100644<br>
--- 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>
- const unsigned num_samples = MAX2(1, mt->num_samples);<br>
+ const unsigned num_samples = MAX2(1, mt->surf.samples);<br>
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>
index bd26e2332c..fffe310b97 100644<br>
--- 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>
- if (rb->mt->num_samples <= 1) {<br>
+ if (rb->mt->surf.samples <= 1) {<br>
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>
index f9fd350918..2d87885e90 100644<br>
--- 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>
- mt->num_samples <= 1 &&<br>
+ mt->surf.samples <= 1 &&<br>
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>
index 3ac6892ea0..1fa40bb5c9 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_fbo.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_fbo.c<br>
@@ -534,7 +534,7 @@ intel_renderbuffer_update_<wbr>wrapper(struct brw_context *brw,<br>
<br>
const unsigned layer_multiplier =<br>
mt->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY ?<br>
- MAX2(mt->num_samples, 1) : 1;<br>
+ MAX2(mt->surf.samples, 1) : 1;<br>
<br>
if (!layered) {<br>
irb->layer_count = 1;<br>
@@ -971,7 +971,7 @@ intel_renderbuffer_move_to_<wbr>temp(struct brw_context *brw,<br>
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>
index 8e241b8462..1e5842ef03 100644<br>
--- 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>
- assert(mt->num_samples <= 1);<br>
+ assert(mt->surf.samples <= 1);<br>
}<br>
<br>
/* Handle the hardware restrictions...<br>
@@ -382,7 +382,7 @@ intel_miptree_create_layout(<wbr>struct brw_context *brw,<br>
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></blockquote><div><br></div><div>MAX2(num_samples, 1)?<br><br></div><div>So, I think this patch is "correct" as-is in that it just switches us to using a different field. However, this does make the future switch to ISL have some sudden effects because of the 0/1 samples difference. Do we want to just take that into account here? I've pointed out the places I've seen that I think will break below.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
mt->compressed = _mesa_is_format_compressed(<wbr>format);<br>
mt->surf.msaa_layout = ISL_MSAA_LAYOUT_NONE;<br>
mt->refcount = 1;<br>
@@ -602,7 +602,7 @@ intel_miptree_choose_aux_<wbr>usage(struct brw_context *brw,<br>
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>
@@ -1364,8 +1364,8 @@ intel_miptree_match_image(<wbr>struct intel_mipmap_tree *mt,<br>
}<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>
@@ -1377,7 +1377,7 @@ intel_miptree_match_image(<wbr>struct intel_mipmap_tree *mt,<br>
return false;<br>
}<br>
<br>
- if (image->NumSamples != mt->num_samples)<br>
+ if (image->NumSamples != mt->surf.samples)<br></blockquote><div><br></div><div>I don't think this works. Core GL uses 0 for single-sampled whereas we use 1 in ISL.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
return false;<br>
<br>
return true;<br>
@@ -1998,8 +1998,8 @@ intel_miptree_alloc_aux(struct brw_context *brw,<br>
<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>
@@ -2011,7 +2011,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>
if (!intel_miptree_alloc_ccs(brw, mt))<br>
return false;<br>
return true;<br>
@@ -2060,7 +2060,7 @@ intel_miptree_sample_with_hiz(<wbr>struct brw_context *brw,<br>
* There is no such blurb for 1D textures, but there is sufficient evidence<br>
* that this is broken on SKL+.<br>
*/<br>
- return (mt->num_samples <= 1 &&<br>
+ return (mt->surf.samples <= 1 &&<br>
mt->target != GL_TEXTURE_3D &&<br>
mt->target != GL_TEXTURE_1D /* gen9+ restriction */);<br>
}<br>
@@ -2120,7 +2120,7 @@ intel_miptree_check_color_<wbr>resolve(const struct brw_context *brw,<br>
(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>
@@ -2460,7 +2460,7 @@ intel_miptree_prepare_access(<wbr>struct brw_context *brw,<br>
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>
@@ -2509,7 +2509,7 @@ intel_miptree_finish_write(<wbr>struct brw_context *brw,<br>
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>
@@ -2541,7 +2541,7 @@ intel_miptree_get_aux_state(<wbr>const struct intel_mipmap_tree *mt,<br>
<br>
if (_mesa_is_format_color_format(<wbr>mt->format)) {<br>
assert(mt->mcs_buf != NULL);<br>
- assert(mt->num_samples <= 1 ||<br>
+ assert(mt->surf.samples <= 1 ||<br>
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>
@@ -2562,7 +2562,7 @@ intel_miptree_set_aux_state(<wbr>struct brw_context *brw,<br>
<br>
if (_mesa_is_format_color_format(<wbr>mt->format)) {<br>
assert(mt->mcs_buf != NULL);<br>
- assert(mt->num_samples <= 1 ||<br>
+ assert(mt->surf.samples <= 1 ||<br>
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>
@@ -2617,7 +2617,7 @@ intel_miptree_prepare_texture_<wbr>slices(struct brw_context *brw,<br>
{<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>
@@ -2684,7 +2684,7 @@ intel_miptree_prepare_render(<wbr>struct brw_context *brw,<br>
* enabled because otherwise the surface state will be programmed with<br>
* the linear equivalent format anyway.<br>
*/<br>
- if (brw->gen == 9 && srgb_enabled && mt->num_samples <= 1 &&<br>
+ if (brw->gen == 9 && srgb_enabled && mt->surf.samples <= 1 &&<br>
_mesa_get_srgb_format_linear(<wbr>mt->format) != mt->format) {<br>
<br>
/* Lossless compression is not supported for SRGB formats, it<br>
@@ -2747,7 +2747,7 @@ intel_miptree_make_shareable(<wbr>struct brw_context *brw,<br>
* reached for multisample buffers.<br>
*/<br>
assert(mt->surf.msaa_layout == ISL_MSAA_LAYOUT_NONE ||<br>
- mt->num_samples <= 1);<br>
+ mt->surf.samples <= 1);<br>
<br>
intel_miptree_prepare_access(<wbr>brw, mt, 0, INTEL_REMAINING_LEVELS,<br>
0, INTEL_REMAINING_LAYERS, false, false);<br>
@@ -2925,7 +2925,7 @@ intel_update_r8stencil(struct brw_context *brw,<br>
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>
@@ -3573,7 +3573,7 @@ intel_miptree_map(struct brw_context *brw,<br>
{<br>
struct intel_miptree_map *map;<br>
<br>
- assert(mt->num_samples <= 1);<br>
+ assert(mt->surf.samples <= 1);<br>
<br>
map = intel_miptree_attach_map(mt, level, slice, x, y, w, h, mode);<br>
if (!map){<br>
@@ -3619,7 +3619,7 @@ intel_miptree_unmap(struct brw_context *brw,<br>
{<br>
struct intel_miptree_map *map = mt->level[level].slice[slice].<wbr>map;<br>
<br>
- assert(mt->num_samples <= 1);<br>
+ assert(mt->surf.samples <= 1);<br>
<br>
if (!map)<br>
return;<br>
@@ -3788,7 +3788,7 @@ intel_miptree_get_isl_surf(<wbr>struct brw_context *brw,<br>
}<br>
<br>
surf->levels = mt->last_level - mt->first_level + 1;<br>
- surf->samples = MAX2(mt->num_samples, 1);<br>
+ surf->samples = MAX2(mt->surf.samples, 1);<br></blockquote><div><br></div><div>Do we still need the MAX2() here?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<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>
<span class="gmail-HOEnZb"><font color="#888888">--<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>
</font></span></blockquote></div><br></div></div>