*/
#define MAX_DEBUG_MESSAGE_LENGTH 4096
+/* Render engine timestamp register */
+#define TIMESTAMP 0x2358
+
static void
compiler_debug_log(void *data, const char *fmt, ...)
{
device->has_implicit_ccs = device->info.has_aux_map;
+ /* Check if we can read the GPU timestamp register from the CPU */
+ uint64_t u64_ignore;
+ device->has_reg_timestamp = anv_gem_reg_read(fd, TIMESTAMP | I915_REG_READ_8B_WA,
+ &u64_ignore) == 0;
+
device->has_mem_available = get_available_system_memory() != 0;
device->always_flush_cache =
return (uint64_t) current.tv_sec * 1000000000ULL + current.tv_nsec;
}
-#define TIMESTAMP 0x2358
-
VkResult anv_GetCalibratedTimestampsEXT(
VkDevice _device,
uint32_t timestampCount,
Extension('VK_KHR_xlib_surface', 6, 'VK_USE_PLATFORM_XLIB_KHR'),
Extension('VK_EXT_acquire_xlib_display', 1, 'VK_USE_PLATFORM_XLIB_XRANDR_EXT'),
Extension('VK_EXT_buffer_device_address', 1, 'device->has_a64_buffer_access'),
- Extension('VK_EXT_calibrated_timestamps', 1, True),
+ Extension('VK_EXT_calibrated_timestamps', 1, 'device->has_reg_timestamp'),
Extension('VK_EXT_conditional_rendering', 1, 'device->info.gen >= 8 || device->info.is_haswell'),
Extension('VK_EXT_custom_border_color', 12, 'device->info.gen >= 8'),
Extension('VK_EXT_debug_report', 8, True),
/** True if we can use bindless access for samplers */
bool has_bindless_samplers;
+ /** True if we can read the GPU timestamp register
+ *
+ * When running in a virtual context, the timestamp register is unreadable
+ * on Gen12+.
+ */
+ bool has_reg_timestamp;
+
/** True if this device has implicit AUX
*
* If true, CCS is handled as an implicit attachment to the BO rather than