void
isl_device_init(struct isl_device *dev,
- const struct brw_device_info *info)
+ const struct brw_device_info *info,
+ bool has_bit6_swizzling)
{
dev->info = info;
dev->use_separate_stencil = ISL_DEV_GEN(dev) >= 6;
+ dev->has_bit6_swizzling = has_bit6_swizzling;
/* The ISL_DEV macros may be defined in the CFLAGS, thus hardcoding some
* device properties at buildtime. Verify that the macros with the device
struct isl_device {
const struct brw_device_info *info;
bool use_separate_stencil;
+ bool has_bit6_swizzling;
};
struct isl_extent2d {
void
isl_device_init(struct isl_device *dev,
- const struct brw_device_info *info);
+ const struct brw_device_info *info,
+ bool has_bit6_swizzling);
static inline const struct isl_format_layout * ATTRIBUTE_CONST
isl_format_get_layout(enum isl_format fmt)
goto fail;
}
+ bool swizzled = anv_gem_get_bit6_swizzle(fd, I915_TILING_X);
+
close(fd);
brw_process_intel_debug_variable();
device->compiler->shader_debug_log = compiler_debug_log;
device->compiler->shader_perf_log = compiler_perf_log;
- isl_device_init(&device->isl_dev, device->info);
+ /* XXX: Actually detect bit6 swizzling */
+ isl_device_init(&device->isl_dev, device->info, swizzled);
return VK_SUCCESS;