summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-01-30 01:44:26 +0100
committerMarek Olšák <marek.olsak@amd.com>2016-02-05 17:28:18 +0100
commit0f3556d308f155936c545ed8b9737c5e3f11a620 (patch)
tree981b6b659ee0e00d89c565efac932726ea621698 /src/gallium/winsys
parenta2291f7b5740d4843a0b945d1d5826c8b54920bc (diff)
downloadexternal_mesa3d-0f3556d308f155936c545ed8b9737c5e3f11a620.zip
external_mesa3d-0f3556d308f155936c545ed8b9737c5e3f11a620.tar.gz
external_mesa3d-0f3556d308f155936c545ed8b9737c5e3f11a620.tar.bz2
winsys/amdgpu: add an assertion to cik_get_num_tile_pipes (v2)
v2: print an error to stderr Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index d1ba259..2c4de75 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -68,7 +68,6 @@ static unsigned cik_get_num_tile_pipes(struct amdgpu_gpu_info *info)
switch (CIK__GB_TILE_MODE__PIPE_CONFIG(mode2d)) {
case CIK__PIPE_CONFIG__ADDR_SURF_P2:
- default:
return 2;
case CIK__PIPE_CONFIG__ADDR_SURF_P4_8x16:
case CIK__PIPE_CONFIG__ADDR_SURF_P4_16x16:
@@ -86,6 +85,10 @@ static unsigned cik_get_num_tile_pipes(struct amdgpu_gpu_info *info)
case CIK__PIPE_CONFIG__ADDR_SURF_P16_32X32_8X16:
case CIK__PIPE_CONFIG__ADDR_SURF_P16_32X32_16X16:
return 16;
+ default:
+ fprintf(stderr, "Invalid CIK pipe configuration, assuming P2\n");
+ assert(!"this should never occur");
+ return 2;
}
}