summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-09-03 11:40:09 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-09-12 19:42:57 -0700
commit54db5afd2c8bd3a32658b3fef698c6896f6a297b (patch)
treefee6499bcc4ca86c58b70b3ef309a0a8546b87fb /src/intel
parentfa4627149dfe7cdb9f75d8e2f1bcaf1ad7006801 (diff)
downloadexternal_mesa3d-54db5afd2c8bd3a32658b3fef698c6896f6a297b.zip
external_mesa3d-54db5afd2c8bd3a32658b3fef698c6896f6a297b.tar.gz
external_mesa3d-54db5afd2c8bd3a32658b3fef698c6896f6a297b.tar.bz2
intel/blorp: Work in terms of logical array layers
When Ivy Bridge introduced array multisampling, someone made the decision to do lots of stuff throughout the driver in terms of physical array layers rather than logical array layers. In ISL, we use logical array layers most of the time and it really makes no sense to use physical array layers in the blorp API. Every time someone passes physical array layers into blorp for an array multisampled surface, they're always divisible by the number of samples and we divide right away. Eventually, I'd like to rework most of the GL driver internals to use logical array layers but that's going to be a big project and will probably happen as part of the ISL conversion. For now, we'll do the conversion in brw_blorp and let blorp just use the logical layers. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/blorp/blorp.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c
index 7b3b097..955e543 100644
--- a/src/intel/blorp/blorp.c
+++ b/src/intel/blorp/blorp.c
@@ -64,16 +64,6 @@ brw_blorp_surface_info_init(struct blorp_context *blorp,
unsigned int level, unsigned int layer,
enum isl_format format, bool is_render_target)
{
- /* Layer is a physical layer, so if this is a 2D multisample array texture
- * using INTEL_MSAA_LAYOUT_UMS or INTEL_MSAA_LAYOUT_CMS, then it had better
- * be a multiple of num_samples.
- */
- unsigned layer_multiplier = 1;
- if (surf->surf->msaa_layout == ISL_MSAA_LAYOUT_ARRAY) {
- assert(layer % surf->surf->samples == 0);
- layer_multiplier = surf->surf->samples;
- }
-
if (format == ISL_FORMAT_UNSUPPORTED)
format = surf->surf->format;
@@ -126,9 +116,9 @@ brw_blorp_surface_info_init(struct blorp_context *blorp,
* guaranteed that we won't be doing any funny surface hacks.
*/
info->view.base_array_layer = 0;
- info->z_offset = layer / layer_multiplier;
+ info->z_offset = layer;
} else {
- info->view.base_array_layer = layer / layer_multiplier;
+ info->view.base_array_layer = layer;
assert(info->view.array_len >= info->view.base_array_layer);
info->view.array_len -= info->view.base_array_layer;