summaryrefslogtreecommitdiffstats
path: root/src/intel/isl
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-10-11 18:26:17 +0100
committerEmil Velikov <[email protected]>2016-10-14 11:53:25 +0100
commiteac752e54b5ec1b8d75d8c22c730af8c9c2a3007 (patch)
treee2cc90051d177ede499a18d7ebe5b2b4524d2178 /src/intel/isl
parent5b1efb65ce0282071d98bc471c8dc05dcafe08fa (diff)
isl/gen7: remove unneeded ISL_DEV_GEN check
The function gen7_format_needs_valign2 has two callers - the gen7 only gen7_choose_valign_el() and isl_gen6_filter_tiling(). The latter of which already guarding the invocation appropriately. To be extra cautious add a couple of asserts alongside the removal of the runtime check. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/intel/isl')
-rw-r--r--src/intel/isl/isl_gen7.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/intel/isl/isl_gen7.c b/src/intel/isl/isl_gen7.c
index 76213f814a5..b6a86d23f37 100644
--- a/src/intel/isl/isl_gen7.c
+++ b/src/intel/isl/isl_gen7.c
@@ -155,9 +155,7 @@ static bool
gen7_format_needs_valign2(const struct isl_device *dev,
enum isl_format format)
{
- /* This workaround applies only to gen7 */
- if (ISL_DEV_GEN(dev) > 7)
- return false;
+ assert(ISL_DEV_GEN(dev) == 7);
/* From the Ivybridge PRM (2012-05-31), Volume 4, Part 1, Section 2.12.1,
* RENDER_SURFACE_STATE Surface Vertical Alignment:
@@ -391,6 +389,8 @@ isl_gen7_choose_image_alignment_el(const struct isl_device *dev,
enum isl_msaa_layout msaa_layout,
struct isl_extent3d *image_align_el)
{
+ assert(ISL_DEV_GEN(dev) == 7);
+
/* Handled by isl_choose_image_alignment_el */
assert(info->format != ISL_FORMAT_HIZ);