<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 11, 2016 at 8:37 AM, Pohjolainen, Topi <span dir="ltr"><<a href="mailto:topi.pohjolainen@intel.com" target="_blank">topi.pohjolainen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Jul 09, 2016 at 12:17:24PM -0700, Jason Ekstrand wrote:<br>
> ---<br>
> src/intel/isl/isl.c | 2 +-<br>
> src/intel/isl/isl_gen6.c | 2 +-<br>
> src/intel/isl/isl_gen7.c | 2 +-<br>
> src/intel/isl/isl_storage_image.c | 4 ++--<br>
> src/intel/vulkan/anv_formats.c | 4 ++--<br>
> src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp | 4 ++--<br>
> 6 files changed, 9 insertions(+), 9 deletions(-)<br>
><br>
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c<br>
> index a3a9427..796b4cc 100644<br>
> --- a/src/intel/isl/isl.c<br>
> +++ b/src/intel/isl/isl.c<br>
> @@ -996,7 +996,7 @@ isl_apply_surface_padding(const struct isl_device *dev,<br>
> * padding requirements.<br>
> */<br>
> if (isl_format_is_yuv(info->format) &&<br>
> - (fmtl->bs == 96 || fmtl->bs == 48|| fmtl->bs == 24)) {<br>
> + (fmtl->bpb == 96 || fmtl->bpb == 48|| fmtl->bpb == 24)) {<br>
<br>
</span>So these values were bits instead of bytes even though stored into 'bs'?<br>
Or how does this work? In the rest you have multiplied by the eight.<br></blockquote><div><br></div><div>We used to use bpb and then we switched to bs and these values were left in bpb. Now we're switching bak so I'm leaving them alone again. :-)<br><br></div><div>In other words, the old code had a bug that this is fixing. Since no one uses ISL for YUV images yet, I didn't figure it was worth separating into its own bugfix patch.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5"><br>
> *total_h_el += 1;<br>
> *pad_bytes += 16;<br>
> }<br>
> diff --git a/src/intel/isl/isl_gen6.c b/src/intel/isl/isl_gen6.c<br>
> index 24c3939..699aa41 100644<br>
> --- a/src/intel/isl/isl_gen6.c<br>
> +++ b/src/intel/isl/isl_gen6.c<br>
> @@ -51,7 +51,7 @@ gen6_choose_msaa_layout(const struct isl_device *dev,<br>
> * - any compressed texture format (BC*)<br>
> * - any YCRCB* format<br>
> */<br>
> - if (fmtl->bs > 8)<br>
> + if (fmtl->bpb > 64)<br>
> return false;<br>
> if (isl_format_is_compressed(info->format))<br>
> return false;<br>
> diff --git a/src/intel/isl/isl_gen7.c b/src/intel/isl/isl_gen7.c<br>
> index 542c137..d9b0c08 100644<br>
> --- a/src/intel/isl/isl_gen7.c<br>
> +++ b/src/intel/isl/isl_gen7.c<br>
> @@ -51,7 +51,7 @@ gen7_choose_msaa_layout(const struct isl_device *dev,<br>
> * formats: any format with greater than 64 bits per element, any<br>
> * compressed texture format (BC*), and any YCRCB* format.<br>
> */<br>
> - if (fmtl->bs > 8)<br>
> + if (fmtl->bpb > 64)<br>
> return false;<br>
> if (isl_format_is_compressed(info->format))<br>
> return false;<br>
> diff --git a/src/intel/isl/isl_storage_image.c b/src/intel/isl/isl_storage_image.c<br>
> index 590d2e4..2617eb0e 100644<br>
> --- a/src/intel/isl/isl_storage_image.c<br>
> +++ b/src/intel/isl/isl_storage_image.c<br>
> @@ -194,9 +194,9 @@ isl_has_matching_typed_storage_image_format(const struct brw_device_info *devinf<br>
> if (devinfo->gen >= 9) {<br>
> return true;<br>
> } else if (devinfo->gen >= 8 || devinfo->is_haswell) {<br>
> - return isl_format_get_layout(fmt)->bs <= 8;<br>
> + return isl_format_get_layout(fmt)->bpb <= 64;<br>
> } else {<br>
> - return isl_format_get_layout(fmt)->bs <= 4;<br>
> + return isl_format_get_layout(fmt)->bpb <= 32;<br>
> }<br>
> }<br>
><br>
> diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c<br>
> index 457e820..b26e48a 100644<br>
> --- a/src/intel/vulkan/anv_formats.c<br>
> +++ b/src/intel/vulkan/anv_formats.c<br>
> @@ -271,7 +271,7 @@ anv_get_format(const struct brw_device_info *devinfo, VkFormat vk_format,<br>
> isl_format_get_layout(format.isl_format);<br>
><br>
> if (tiling == VK_IMAGE_TILING_OPTIMAL &&<br>
> - !util_is_power_of_two(isl_layout->bs)) {<br>
> + !util_is_power_of_two(isl_layout->bpb)) {<br>
> /* Tiled formats *must* be power-of-two because we need up upload<br>
> * them with the render pipeline. For 3-channel formats, we fix<br>
> * this by switching them over to RGBX or RGBA formats under the<br>
> @@ -409,7 +409,7 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d<br>
> * what most clients will want.<br>
> */<br>
> if (linear_fmt.isl_format != ISL_FORMAT_UNSUPPORTED &&<br>
> - !util_is_power_of_two(isl_format_layouts[linear_fmt.isl_format].bs) &&<br>
> + !util_is_power_of_two(isl_format_layouts[linear_fmt.isl_format].bpb) &&<br>
> isl_format_rgb_to_rgbx(linear_fmt.isl_format) == ISL_FORMAT_UNSUPPORTED) {<br>
> tiled &= ~VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT &<br>
> ~VK_FORMAT_FEATURE_BLIT_DST_BIT;<br>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp<br>
> index fc1fc13..a4774e6 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp<br>
> +++ b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp<br>
> @@ -982,7 +982,7 @@ namespace brw {<br>
> /* Untyped surface reads return 32 bits of the surface per<br>
> * component, without any sort of unpacking or type conversion,<br>
> */<br>
> - const unsigned size = isl_format_get_layout(format)->bs / 4;<br>
> + const unsigned size = isl_format_get_layout(format)->bpb / 32;<br>
> /* they don't properly handle out of bounds access, so we have to<br>
> * check manually if the coordinates are valid and predicate the<br>
> * surface read on the result,<br>
> @@ -1130,7 +1130,7 @@ namespace brw {<br>
> /* Untyped surface writes store 32 bits of the surface per<br>
> * component, without any sort of packing or type conversion,<br>
> */<br>
> - const unsigned size = isl_format_get_layout(format)->bs / 4;<br>
> + const unsigned size = isl_format_get_layout(format)->bpb / 32;<br>
><br>
> /* they don't properly handle out of bounds access, so we have<br>
> * to check manually if the coordinates are valid and predicate<br>
> --<br>
> 2.5.0.400.gff86faf<br>
><br>
</div></div>> _______________________________________________<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/mailman/listinfo/mesa-dev</a><br>
</blockquote></div><br></div></div>