mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-04 20:20:21 +01:00
tests/amdgpu: fix compile warning with the guard enum value
../../drm/tests/amdgpu/shader_test_util.c: In function
‘amdgpu_dispatch_init’:
../../drm/tests/amdgpu/shader_test_util.c:296:9: warning: enumeration
value ‘AMDGPU_TEST_GFX_MAX’ not handled in switch [-Wswitch]
296 | switch (test_priv->info->version) {
| ^~~~~~
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
4df9173595
commit
058a04de62
1 changed files with 28 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "CUnit/Basic.h"
|
||||
#include "amdgpu_test.h"
|
||||
|
|
@ -303,6 +304,9 @@ static void amdgpu_dispatch_init(struct shader_test_priv *test_priv)
|
|||
case AMDGPU_TEST_GFX_V11:
|
||||
amdgpu_dispatch_init_gfx11(test_priv);
|
||||
break;
|
||||
case AMDGPU_TEST_GFX_MAX:
|
||||
assert(1 && "Not Support gfx, never go here");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -338,6 +342,9 @@ static void amdgpu_dispatch_write_cumask(struct shader_test_priv *test_priv)
|
|||
ptr[i++] = 0xffffffff;
|
||||
ptr[i++] = 0xffffffff;
|
||||
break;
|
||||
case AMDGPU_TEST_GFX_MAX:
|
||||
assert(1 && "Not Support gfx, never go here");
|
||||
break;
|
||||
}
|
||||
|
||||
test_priv->cmd_curr = i;
|
||||
|
|
@ -541,6 +548,9 @@ static void amdgpu_dispatch_write2hw(struct shader_test_priv *test_priv)
|
|||
case AMDGPU_TEST_GFX_V11:
|
||||
amdgpu_dispatch_write2hw_gfx11(test_priv);
|
||||
break;
|
||||
case AMDGPU_TEST_GFX_MAX:
|
||||
assert(1 && "Not Support gfx, never go here");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1168,6 +1178,9 @@ static void amdgpu_draw_setup_and_write_drawblt_surf_info(struct shader_test_pri
|
|||
case AMDGPU_TEST_GFX_V11:
|
||||
amdgpu_draw_setup_and_write_drawblt_surf_info_gfx11(test_priv);
|
||||
break;
|
||||
case AMDGPU_TEST_GFX_MAX:
|
||||
assert(1 && "Not Support gfx, never go here");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1298,6 +1311,9 @@ static void amdgpu_draw_setup_and_write_drawblt_state(struct shader_test_priv *t
|
|||
case AMDGPU_TEST_GFX_V11:
|
||||
amdgpu_draw_setup_and_write_drawblt_state_gfx11(test_priv);
|
||||
break;
|
||||
case AMDGPU_TEST_GFX_MAX:
|
||||
assert(1 && "Not Support gfx, never go here");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1546,6 +1562,9 @@ static void amdgpu_draw_vs_RectPosTexFast_write2hw(struct shader_test_priv *test
|
|||
case AMDGPU_TEST_GFX_V11:
|
||||
amdgpu_draw_vs_RectPosTexFast_write2hw_gfx11(test_priv);
|
||||
break;
|
||||
case AMDGPU_TEST_GFX_MAX:
|
||||
assert(1 && "Not Support gfx, never go here");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1679,6 +1698,9 @@ static void amdgpu_draw_ps_write2hw(struct shader_test_priv *test_priv)
|
|||
case AMDGPU_TEST_GFX_V11:
|
||||
amdgpu_draw_ps_write2hw_gfx11(test_priv);
|
||||
break;
|
||||
case AMDGPU_TEST_GFX_MAX:
|
||||
assert(1 && "Not Support gfx, never go here");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1718,6 +1740,9 @@ static void amdgpu_draw_draw(struct shader_test_priv *test_priv)
|
|||
ptr[i++] = 0x242;
|
||||
ptr[i++] = 0x11;
|
||||
break;
|
||||
case AMDGPU_TEST_GFX_MAX:
|
||||
assert(1 && "Not Support gfx, never go here");
|
||||
break;
|
||||
}
|
||||
|
||||
ptr[i++] = PACKET3(PACKET3_DRAW_INDEX_AUTO, 1);
|
||||
|
|
@ -2010,6 +2035,9 @@ static void amdgpu_memcpy_draw_test(struct shader_test_info *test_info)
|
|||
ptr_cmd[i++] = 0x400;
|
||||
i++;
|
||||
break;
|
||||
case AMDGPU_TEST_GFX_MAX:
|
||||
assert(1 && "Not Support gfx, never go here");
|
||||
break;
|
||||
}
|
||||
|
||||
ptr_cmd[i++] = PACKET3(PACKET3_SET_SH_REG, 4);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue