diff options
author | Marek Olšák <[email protected]> | 2016-10-20 22:57:03 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-26 13:02:58 +0200 |
commit | 81a95946dab730c1cfcf04ac1373cea5f7908f65 (patch) | |
tree | f2bffccf7708d25b7f8c01a6fa634a588d2e52ef /src/gallium/drivers | |
parent | dc6bbe2dd0eb9ba421c8454b3b6179a6b0452b40 (diff) |
gallium/radeon: fold radeon_winsys::surface_best into radeon/winsys
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_winsys.h | 10 |
2 files changed, 3 insertions, 13 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 27035c0faab..c38654989b3 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -1296,10 +1296,7 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen, if (r) { return NULL; } - r = rscreen->ws->surface_best(rscreen->ws, &surface); - if (r) { - return NULL; - } + return (struct pipe_resource *)r600_texture_create_object(screen, templ, 0, 0, NULL, &surface); } @@ -1349,6 +1346,7 @@ static struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen return NULL; } + surface.flags |= RADEON_SURF_IMPORTED; if (metadata.scanout) surface.flags |= RADEON_SURF_SCANOUT; diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h index 8946209d337..75badd0246f 100644 --- a/src/gallium/drivers/radeon/radeon_winsys.h +++ b/src/gallium/drivers/radeon/radeon_winsys.h @@ -279,6 +279,7 @@ enum radeon_feature_id { #define RADEON_SURF_FMASK (1 << 21) #define RADEON_SURF_DISABLE_DCC (1 << 22) #define RADEON_SURF_TC_COMPATIBLE_HTILE (1 << 23) +#define RADEON_SURF_IMPORTED (1 << 24) #define RADEON_SURF_GET(v, field) (((v) >> RADEON_SURF_ ## field ## _SHIFT) & RADEON_SURF_ ## field ## _MASK) #define RADEON_SURF_SET(v, field) (((v) & RADEON_SURF_ ## field ## _MASK) << RADEON_SURF_ ## field ## _SHIFT) @@ -744,15 +745,6 @@ struct radeon_winsys { int (*surface_init)(struct radeon_winsys *ws, struct radeon_surf *surf); - /** - * Find best values for a surface - * - * \param ws The winsys this function is called from. - * \param surf Surface structure ptr - */ - int (*surface_best)(struct radeon_winsys *ws, - struct radeon_surf *surf); - uint64_t (*query_value)(struct radeon_winsys *ws, enum radeon_value_id value); |