sna: Correct tile sizes for Y-tiling on i915g
128-byte Y-tiling wasn't introduced until the 945. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
95391b7312
commit
7d147c7462
|
|
@ -731,11 +731,16 @@ static uint32_t kgem_untiled_pitch(struct kgem *kgem,
|
|||
void kgem_get_tile_size(struct kgem *kgem, int tiling,
|
||||
int *tile_width, int *tile_height, int *tile_size)
|
||||
{
|
||||
if (kgem->gen < 30) {
|
||||
if (kgem->gen <= 30) {
|
||||
if (tiling) {
|
||||
*tile_width = 512;
|
||||
*tile_height = 16;
|
||||
*tile_size = 2048;
|
||||
if (kgem->gen < 30) {
|
||||
*tile_height = 16;
|
||||
*tile_size = 2048;
|
||||
} else {
|
||||
*tile_height = 8;
|
||||
*tile_size = 4096;
|
||||
}
|
||||
} else {
|
||||
*tile_width = 1;
|
||||
*tile_height = 1;
|
||||
|
|
@ -754,7 +759,7 @@ void kgem_get_tile_size(struct kgem *kgem, int tiling,
|
|||
*tile_size = 4096;
|
||||
break;
|
||||
case I915_TILING_Y:
|
||||
*tile_width = kgem->gen <= 30 ? 512 : 128;
|
||||
*tile_width = 128;
|
||||
*tile_height = 32;
|
||||
*tile_size = 4096;
|
||||
break;
|
||||
|
|
@ -776,10 +781,10 @@ static uint32_t kgem_surface_size(struct kgem *kgem,
|
|||
assert(width <= MAXSHORT);
|
||||
assert(height <= MAXSHORT);
|
||||
|
||||
if (kgem->gen < 30) {
|
||||
if (kgem->gen <= 30) {
|
||||
if (tiling) {
|
||||
tile_width = 512;
|
||||
tile_height = 16;
|
||||
tile_height = kgem->gen < 30 ? 16 : 8;
|
||||
} else {
|
||||
tile_width = scanout ? 64 : kgem->min_alignment;
|
||||
tile_height = 2;
|
||||
|
|
@ -795,7 +800,7 @@ static uint32_t kgem_surface_size(struct kgem *kgem,
|
|||
tile_height = 8;
|
||||
break;
|
||||
case I915_TILING_Y:
|
||||
tile_width = kgem->gen <= 30 ? 512 : 128;
|
||||
tile_width = 128;
|
||||
tile_height = 32;
|
||||
break;
|
||||
}
|
||||
|
|
@ -837,8 +842,8 @@ static uint32_t kgem_aligned_height(struct kgem *kgem,
|
|||
{
|
||||
uint32_t tile_height;
|
||||
|
||||
if (kgem->gen < 30) {
|
||||
tile_height = tiling ? 16 : 2;
|
||||
if (kgem->gen <= 30) {
|
||||
tile_height = tiling ? kgem->gen < 30 ? 16 : 8 : 1;
|
||||
} else switch (tiling) {
|
||||
default:
|
||||
case I915_TILING_NONE:
|
||||
|
|
|
|||
Loading…
Reference in New Issue