summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-11-04 15:12:19 -0800
committerJason Ekstrand <jason.ekstrand@intel.com>2016-04-21 20:44:27 -0700
commit24bb75049ba0f5cdda5808fcdbb659f2dd3ce45b (patch)
treeb37bcbd180dfa8d13438c7ce551765e0c7ea13b8 /src/mesa/drivers/dri
parentf310c02b94fba0a0a5ea7f5573f906de823cc5fe (diff)
downloadexternal_mesa3d-24bb75049ba0f5cdda5808fcdbb659f2dd3ce45b.zip
external_mesa3d-24bb75049ba0f5cdda5808fcdbb659f2dd3ce45b.tar.gz
external_mesa3d-24bb75049ba0f5cdda5808fcdbb659f2dd3ce45b.tar.bz2
i965/fs_surface_builder: Explicitly handle FORMAT_NONE in num_image_coordinates
Previously, we were relying on has_matching_typed_format returning true for MESA_FORMAT_NONE which, in turn, relied on _mesa_get_format_bytes returning 1 for MESA_FORMAT_NONE. When we switch to ISL, this behaviour will no longer be something we can rely on. Reviewed-by: Chad Versace <chad.versace@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
index 04d1cd2..0932336 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
@@ -410,6 +410,7 @@ namespace {
* reads want the array index to be at the Z component.
*/
const bool array_index_at_z =
+ format != MESA_FORMAT_NONE &&
!image_format_info::has_matching_typed_format(
bld.shader->devinfo, format);
const unsigned zero_dims =