void
genX(init_screen_state)(struct iris_screen *screen)
{
+ assert(screen->devinfo.genx10 == GEN_VERSIONx10);
screen->vtbl.destroy_state = iris_destroy_state;
screen->vtbl.init_render_context = iris_init_render_context;
screen->vtbl.init_compute_context = iris_init_compute_context;
static const struct gen_device_info gen_device_info_g4x = {
.gen = 4,
+ .genx10 = 45,
.has_pln = true,
.has_compr4 = true,
.has_surface_tile_offset = true,
#define HSW_FEATURES \
GEN7_FEATURES, \
.is_haswell = true, \
+ .genx10 = 75, \
.supports_simd16_3src = true, \
.has_resource_streamer = true
return false;
}
+ if (devinfo->genx10 == 0)
+ devinfo->genx10 = devinfo->gen * 10;
+
/* remaining initializion queries the kernel for device info */
if (devinfo->no_hw)
return true;
struct gen_device_info
{
int gen; /**< Generation number: 4, 5, 6, 7, ... */
+ /* Driver internal number used to differentiate platforms. */
+ int genx10;
int revision;
int gt;
device->local_fd = fd;
+ anv_genX(&device->info, init_physical_device_state)(device);
+
*device_out = device;
return VK_SUCCESS;
extern const uint32_t genX(vk_to_gen_stencil_op)[];
+void genX(init_physical_device_state)(struct anv_physical_device *device);
+
VkResult genX(init_device_state)(struct anv_device *device);
void genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer);
return anv_queue_submit_simple_batch(queue, &batch);
}
+void
+genX(init_physical_device_state)(ASSERTED struct anv_physical_device *device)
+{
+ assert(device->info.genx10 == GEN_VERSIONx10);
+}
+
VkResult
genX(init_device_state)(struct anv_device *device)
{
brw->vtbl.emit_mi_report_perf_count = genX(emit_mi_report_perf_count);
brw->vtbl.emit_compute_walker = genX(emit_gpgpu_walker);
#endif
+
+ assert(brw->screen->devinfo.genx10 == GEN_VERSIONx10);
}