isl: Use bpb in a few places where it's more natural than bs
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 9 Jul 2016 05:10:11 +0000 (22:10 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 13 Jul 2016 18:47:37 +0000 (11:47 -0700)
Reviewed-by: Chad Versace <chad.versace@intel.com>
src/intel/isl/isl_gen6.c
src/intel/isl/isl_gen7.c
src/intel/isl/isl_storage_image.c
src/intel/vulkan/anv_formats.c
src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp

index 24c393925ed7730335e5d5fef839087024f01687..699aa41d7ba881a3c0f77e4864b3e606279054a0 100644 (file)
@@ -51,7 +51,7 @@ gen6_choose_msaa_layout(const struct isl_device *dev,
     *       - any compressed texture format (BC*)
     *       - any YCRCB* format
     */
-   if (fmtl->bs > 8)
+   if (fmtl->bpb > 64)
       return false;
    if (isl_format_is_compressed(info->format))
       return false;
index 542c137458fc82b0569757f104d3e5f7068d765d..d9b0c080a4c075cf5daa48a5ea723ec890d7ac33 100644 (file)
@@ -51,7 +51,7 @@ gen7_choose_msaa_layout(const struct isl_device *dev,
     *    formats: any format with greater than 64 bits per element, any
     *    compressed texture format (BC*), and any YCRCB* format.
     */
-   if (fmtl->bs > 8)
+   if (fmtl->bpb > 64)
       return false;
    if (isl_format_is_compressed(info->format))
       return false;
index 590d2e48b05397e9af41d16411911fb6c97eea79..2617eb0eaffb54a9eaabfef5419ee08fbb7cb431 100644 (file)
@@ -194,9 +194,9 @@ isl_has_matching_typed_storage_image_format(const struct brw_device_info *devinf
    if (devinfo->gen >= 9) {
       return true;
    } else if (devinfo->gen >= 8 || devinfo->is_haswell) {
-      return isl_format_get_layout(fmt)->bs <= 8;
+      return isl_format_get_layout(fmt)->bpb <= 64;
    } else {
-      return isl_format_get_layout(fmt)->bs <= 4;
+      return isl_format_get_layout(fmt)->bpb <= 32;
    }
 }
 
index 457e82003d69dfe967d8aeae85b29674fb93a065..b26e48a6c0b77a5694a655d0e3518992be21887b 100644 (file)
@@ -271,7 +271,7 @@ anv_get_format(const struct brw_device_info *devinfo, VkFormat vk_format,
       isl_format_get_layout(format.isl_format);
 
    if (tiling == VK_IMAGE_TILING_OPTIMAL &&
-       !util_is_power_of_two(isl_layout->bs)) {
+       !util_is_power_of_two(isl_layout->bpb)) {
       /* Tiled formats *must* be power-of-two because we need up upload
        * them with the render pipeline.  For 3-channel formats, we fix
        * this by switching them over to RGBX or RGBA formats under the
@@ -409,7 +409,7 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
        * what most clients will want.
        */
       if (linear_fmt.isl_format != ISL_FORMAT_UNSUPPORTED &&
-          !util_is_power_of_two(isl_format_layouts[linear_fmt.isl_format].bs) &&
+          !util_is_power_of_two(isl_format_layouts[linear_fmt.isl_format].bpb) &&
           isl_format_rgb_to_rgbx(linear_fmt.isl_format) == ISL_FORMAT_UNSUPPORTED) {
          tiled &= ~VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT &
                   ~VK_FORMAT_FEATURE_BLIT_DST_BIT;
index fc1fc139dde2fa1d228d5f604773d5671dcdb335..a4774e6cac673f247f4b905a5340fdc77477d06c 100644 (file)
@@ -982,7 +982,7 @@ namespace brw {
             /* Untyped surface reads return 32 bits of the surface per
              * component, without any sort of unpacking or type conversion,
              */
-            const unsigned size = isl_format_get_layout(format)->bs / 4;
+            const unsigned size = isl_format_get_layout(format)->bpb / 32;
             /* they don't properly handle out of bounds access, so we have to
              * check manually if the coordinates are valid and predicate the
              * surface read on the result,
@@ -1130,7 +1130,7 @@ namespace brw {
                /* Untyped surface writes store 32 bits of the surface per
                 * component, without any sort of packing or type conversion,
                 */
-               const unsigned size = isl_format_get_layout(format)->bs / 4;
+               const unsigned size = isl_format_get_layout(format)->bpb / 32;
 
                /* they don't properly handle out of bounds access, so we have
                 * to check manually if the coordinates are valid and predicate