diff options
author | Chia-I Wu <[email protected]> | 2015-06-29 16:46:34 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2015-07-01 15:54:39 +0800 |
commit | 3c6af396f9526bdc8351ff61bcc6c42a3892e6b8 (patch) | |
tree | 1ff7c1a3b6d12fabe4fa1b759374e5871e7e1fe4 /src/gallium/drivers/ilo/ilo_resource.c | |
parent | 0896d629fded96178daa79c393ba4dae0d56f2ff (diff) |
ilo: add image_set_gen6_bo_size()
It replaces img_calculate_bo_size().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_resource.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_resource.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c index 962c710a57a..3797c8ec24f 100644 --- a/src/gallium/drivers/ilo/ilo_resource.c +++ b/src/gallium/drivers/ilo/ilo_resource.c @@ -199,6 +199,14 @@ resource_get_image_info(const struct pipe_resource *templ, if (templ->bind & PIPE_BIND_LINEAR) info->valid_tilings = 1 << GEN6_TILING_NONE; + /* + * Tiled images must be mapped via GTT to get a linear view. Prefer linear + * images when the image size is greater than one-fourth of the mappable + * aperture. + */ + if (templ->bind & (PIPE_BIND_TRANSFER_WRITE | PIPE_BIND_TRANSFER_READ)) + info->prefer_linear_threshold = dev->aperture_mappable / 4; + info->bind_surface_sampler = (templ->bind & PIPE_BIND_SAMPLER_VIEW); info->bind_surface_dp_render = (templ->bind & PIPE_BIND_RENDER_TARGET); info->bind_surface_dp_typed = (templ->bind & |