intel/dev: Add devinfo genx10 field

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9329>
This commit is contained in:
Jordan Justen
2021-02-27 15:09:56 -08:00
parent 36dd7c44f6
commit d846901d9d
7 changed files with 20 additions and 0 deletions
+5
View File
@@ -106,6 +106,7 @@ static const struct gen_device_info gen_device_info_i965 = {
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,
@@ -300,6 +301,7 @@ static const struct gen_device_info gen_device_info_byt = {
#define HSW_FEATURES \
GEN7_FEATURES, \
.is_haswell = true, \
.genx10 = 75, \
.supports_simd16_3src = true, \
.has_resource_streamer = true
@@ -1424,6 +1426,9 @@ gen_get_device_info_from_fd(int fd, struct gen_device_info *devinfo)
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;
+2
View File
@@ -47,6 +47,8 @@ struct drm_i915_query_topology_info;
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;
+2
View File
@@ -871,6 +871,8 @@ anv_physical_device_try_create(struct anv_instance *instance,
device->local_fd = fd;
anv_genX(&device->info, init_physical_device_state)(device);
*device_out = device;
return VK_SUCCESS;
+2
View File
@@ -46,6 +46,8 @@ extern const uint32_t genX(vk_to_gen_compare_op)[];
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);
+6
View File
@@ -352,6 +352,12 @@ init_render_queue_state(struct anv_queue *queue)
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)
{