mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
ilo: move intel_winsys to ilo_dev_info
We want to use ilo_dev_info instead of ilo_screen in core.
This commit is contained in:
parent
b3197fe5f4
commit
19351af53d
5 changed files with 15 additions and 13 deletions
|
|
@ -35,7 +35,11 @@
|
|||
#define ILO_DEV_ASSERT(dev, min_gen, max_gen) \
|
||||
ilo_dev_assert(dev, ILO_GEN(min_gen), ILO_GEN(max_gen))
|
||||
|
||||
struct intel_winsys;
|
||||
|
||||
struct ilo_dev_info {
|
||||
struct intel_winsys *winsys;
|
||||
|
||||
/* these mirror intel_winsys_info */
|
||||
int devid;
|
||||
size_t aperture_total;
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ ilo_context_create(struct pipe_screen *screen, void *priv)
|
|||
if (!ilo)
|
||||
return NULL;
|
||||
|
||||
ilo->winsys = is->winsys;
|
||||
ilo->winsys = is->dev.winsys;
|
||||
ilo->dev = &is->dev;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ tex_import_handle(struct ilo_texture *tex,
|
|||
enum intel_tiling_mode tiling;
|
||||
unsigned long pitch;
|
||||
|
||||
tex->bo = intel_winsys_import_handle(is->winsys, name, handle,
|
||||
tex->bo = intel_winsys_import_handle(is->dev.winsys, name, handle,
|
||||
tex->layout.bo_height, &tiling, &pitch);
|
||||
if (!tex->bo)
|
||||
return false;
|
||||
|
|
@ -187,7 +187,7 @@ tex_create_bo(struct ilo_texture *tex)
|
|||
const bool cpu_init = resource_get_cpu_init(&tex->base);
|
||||
struct intel_bo *bo;
|
||||
|
||||
bo = intel_winsys_alloc_bo(is->winsys, name,
|
||||
bo = intel_winsys_alloc_bo(is->dev.winsys, name,
|
||||
tex->layout.bo_stride * tex->layout.bo_height, cpu_init);
|
||||
|
||||
/* set the tiling for transfer and export */
|
||||
|
|
@ -241,7 +241,7 @@ tex_create_hiz(struct ilo_texture *tex)
|
|||
struct ilo_screen *is = ilo_screen(tex->base.screen);
|
||||
unsigned lv;
|
||||
|
||||
tex->aux_bo = intel_winsys_alloc_bo(is->winsys, "hiz texture",
|
||||
tex->aux_bo = intel_winsys_alloc_bo(is->dev.winsys, "hiz texture",
|
||||
tex->layout.aux_stride * tex->layout.aux_height, false);
|
||||
if (!tex->aux_bo)
|
||||
return false;
|
||||
|
|
@ -270,7 +270,7 @@ tex_create_mcs(struct ilo_texture *tex)
|
|||
|
||||
assert(tex->layout.aux_enables == (1 << (tex->base.last_level + 1)) - 1);
|
||||
|
||||
tex->aux_bo = intel_winsys_alloc_bo(is->winsys, "mcs texture",
|
||||
tex->aux_bo = intel_winsys_alloc_bo(is->dev.winsys, "mcs texture",
|
||||
tex->layout.aux_stride * tex->layout.aux_height, false);
|
||||
if (!tex->aux_bo)
|
||||
return false;
|
||||
|
|
@ -397,7 +397,7 @@ tex_get_handle(struct ilo_texture *tex, struct winsys_handle *handle)
|
|||
else
|
||||
tiling = surface_to_winsys_tiling(tex->layout.tiling);
|
||||
|
||||
err = intel_winsys_export_handle(is->winsys, tex->bo, tiling,
|
||||
err = intel_winsys_export_handle(is->dev.winsys, tex->bo, tiling,
|
||||
tex->layout.bo_stride, tex->layout.bo_height, handle);
|
||||
|
||||
return !err;
|
||||
|
|
@ -410,7 +410,7 @@ buf_create_bo(struct ilo_buffer *buf)
|
|||
const char *name = resource_get_bo_name(&buf->base);
|
||||
const bool cpu_init = resource_get_cpu_init(&buf->base);
|
||||
|
||||
buf->bo = intel_winsys_alloc_bo(is->winsys, name, buf->bo_size, cpu_init);
|
||||
buf->bo = intel_winsys_alloc_bo(is->dev.winsys, name, buf->bo_size, cpu_init);
|
||||
|
||||
return (buf->bo != NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -559,7 +559,7 @@ ilo_get_timestamp(struct pipe_screen *screen)
|
|||
uint32_t dw[2];
|
||||
} timestamp;
|
||||
|
||||
intel_winsys_read_reg(is->winsys, GEN6_REG_TIMESTAMP, ×tamp.val);
|
||||
intel_winsys_read_reg(is->dev.winsys, GEN6_REG_TIMESTAMP, ×tamp.val);
|
||||
|
||||
/*
|
||||
* From the Ivy Bridge PRM, volume 1 part 3, page 107:
|
||||
|
|
@ -664,7 +664,7 @@ ilo_screen_destroy(struct pipe_screen *screen)
|
|||
struct ilo_screen *is = ilo_screen(screen);
|
||||
|
||||
/* as it seems, winsys is owned by the screen */
|
||||
intel_winsys_destroy(is->winsys);
|
||||
intel_winsys_destroy(is->dev.winsys);
|
||||
|
||||
FREE(is);
|
||||
}
|
||||
|
|
@ -820,9 +820,9 @@ ilo_screen_create(struct intel_winsys *ws)
|
|||
if (!is)
|
||||
return NULL;
|
||||
|
||||
is->winsys = ws;
|
||||
is->dev.winsys = ws;
|
||||
|
||||
info = intel_winsys_get_info(is->winsys);
|
||||
info = intel_winsys_get_info(is->dev.winsys);
|
||||
if (!init_dev(&is->dev, info)) {
|
||||
FREE(is);
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include "ilo_common.h"
|
||||
|
||||
struct intel_winsys;
|
||||
struct intel_bo;
|
||||
|
||||
struct ilo_fence;
|
||||
|
|
@ -40,7 +39,6 @@ struct ilo_fence;
|
|||
struct ilo_screen {
|
||||
struct pipe_screen base;
|
||||
|
||||
struct intel_winsys *winsys;
|
||||
struct ilo_dev_info dev;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue