[Mesa-dev] [PATCH 1/5] intel/isl: Rename supports_lossless_compression to supports_ccs_e
Jason Ekstrand
jason at jlekstrand.net
Wed Feb 1 22:40:37 UTC 2017
The term "lossless compression" could potentially mean multisample
color compression, single-sample color compression or HiZ because they
are all lossless. The term CCS_E, however, has a very precise meaning;
in ISL and is only used to refer to single-sample color compression.
It's also much shorter which is nice.
---
src/intel/isl/isl.h | 4 ++--
src/intel/isl/isl_format.c | 8 ++++----
src/intel/vulkan/anv_image.c | 2 +-
src/intel/vulkan/genX_cmd_buffer.c | 3 +--
src/mesa/drivers/dri/i965/brw_context.c | 3 +--
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 3 +--
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 +--
7 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index 07368f9..bdc5ebf 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -1040,8 +1040,8 @@ bool isl_format_supports_filtering(const struct gen_device_info *devinfo,
enum isl_format format);
bool isl_format_supports_vertex_fetch(const struct gen_device_info *devinfo,
enum isl_format format);
-bool isl_format_supports_lossless_compression(const struct gen_device_info *devinfo,
- enum isl_format format);
+bool isl_format_supports_ccs_e(const struct gen_device_info *devinfo,
+ enum isl_format format);
bool isl_format_supports_multisampling(const struct gen_device_info *devinfo,
enum isl_format format);
diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c
index bc157d5..ebc8ec9 100644
--- a/src/intel/isl/isl_format.c
+++ b/src/intel/isl/isl_format.c
@@ -37,7 +37,7 @@ struct surface_format_info {
uint8_t input_vb;
uint8_t streamed_output_vb;
uint8_t color_processing;
- uint8_t lossless_compression;
+ uint8_t ccs_e;
};
/* This macro allows us to write the table almost as it appears in the PRM,
@@ -438,13 +438,13 @@ isl_format_supports_vertex_fetch(const struct gen_device_info *devinfo,
}
bool
-isl_format_supports_lossless_compression(const struct gen_device_info *devinfo,
- enum isl_format format)
+isl_format_supports_ccs_e(const struct gen_device_info *devinfo,
+ enum isl_format format)
{
if (!format_info[format].exists)
return false;
- return format_gen(devinfo) >= format_info[format].lossless_compression;
+ return format_gen(devinfo) >= format_info[format].ccs_e;
}
bool
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 1c42821..94436ca 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -229,7 +229,7 @@ make_surface(const struct anv_device *dev,
* leave compression on at all times for these formats.
*/
if (!(vk_info->flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) &&
- isl_format_supports_lossless_compression(&dev->info, format)) {
+ isl_format_supports_ccs_e(&dev->info, format)) {
if (vk_info->usage & VK_IMAGE_USAGE_STORAGE_BIT) {
/*
* For now, we leave compression off for anything that may
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index b6b7f74..505012a 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -266,8 +266,7 @@ color_attachment_compute_aux_usage(struct anv_device *device,
att_state->fast_clear = false;
}
- if (isl_format_supports_lossless_compression(&device->info,
- iview->isl.format)) {
+ if (isl_format_supports_ccs_e(&device->info, iview->isl.format)) {
att_state->aux_usage = ISL_AUX_USAGE_CCS_E;
att_state->input_aux_usage = ISL_AUX_USAGE_CCS_E;
} else if (att_state->fast_clear) {
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 071de11..7240b1f 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -208,8 +208,7 @@ intel_texture_view_requires_resolve(struct brw_context *brw,
const uint32_t brw_format = brw_format_for_mesa_format(intel_tex->_Format);
- if (isl_format_supports_lossless_compression(&brw->screen->devinfo,
- brw_format))
+ if (isl_format_supports_ccs_e(&brw->screen->devinfo, brw_format))
return false;
perf_debug("Incompatible sampling format (%s) for rbc (%s)\n",
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index a6fadf9..177b530 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -447,8 +447,7 @@ brw_texture_view_sane(const struct brw_context *brw,
if (!intel_miptree_is_lossless_compressed(brw, mt))
return true;
- if (isl_format_supports_lossless_compression(&brw->screen->devinfo,
- view->format))
+ if (isl_format_supports_ccs_e(&brw->screen->devinfo, view->format))
return true;
/* Logic elsewhere needs to take care to resolve the color buffer prior
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 31049b3..b339f99 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -210,8 +210,7 @@ intel_miptree_supports_non_msrt_fast_clear(struct brw_context *brw,
if (brw->gen >= 9) {
mesa_format linear_format = _mesa_get_srgb_format_linear(mt->format);
const uint32_t brw_format = brw_format_for_mesa_format(linear_format);
- return isl_format_supports_lossless_compression(&brw->screen->devinfo,
- brw_format);
+ return isl_format_supports_ccs_e(&brw->screen->devinfo, brw_format);
} else
return true;
}
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list