@ -150,7 +150,7 @@ static struct res_test testlist[] = {
/* 1D texture with samples - FAIL */
/* 1D texture with samples - FAIL */
TEST ( 1 , PIPE_TEXTURE_1D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , EINVAL ) ,
TEST ( 1 , PIPE_TEXTURE_1D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , EINVAL ) ,
/* 1D texture with miplevels - PASS */
/* 1D texture with miplevels - PASS */
TEST_MIP ( 1 , PIPE_TEXTURE_1D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 1 , 4 , 0 ) ,
TEST_MIP ( 1 , PIPE_TEXTURE_1D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 4 , 0 ) ,
/* 1D array texture - PASS */
/* 1D array texture - PASS */
TEST ( 1 , PIPE_TEXTURE_1D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 0 ) ,
TEST ( 1 , PIPE_TEXTURE_1D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 0 ) ,
@ -163,7 +163,7 @@ static struct res_test testlist[] = {
/* 1D texture with samples - FAIL */
/* 1D texture with samples - FAIL */
TEST ( 1 , PIPE_TEXTURE_1D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , EINVAL ) ,
TEST ( 1 , PIPE_TEXTURE_1D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , EINVAL ) ,
/* 1D array texture with miplevels - PASS */
/* 1D array texture with miplevels - PASS */
TEST_MIP ( 1 , PIPE_TEXTURE_1D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 1 , 4 , 0 ) ,
TEST_MIP ( 1 , PIPE_TEXTURE_1D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 4 , 0 ) ,
/* 2D texture - PASS */
/* 2D texture - PASS */
TEST ( 1 , PIPE_TEXTURE_2D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 0 ) ,
TEST ( 1 , PIPE_TEXTURE_2D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 0 ) ,
@ -177,7 +177,7 @@ static struct res_test testlist[] = {
/* 2D texture with samples - PASS */
/* 2D texture with samples - PASS */
TEST ( 1 , PIPE_TEXTURE_2D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , 0 ) ,
TEST ( 1 , PIPE_TEXTURE_2D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , 0 ) ,
/* 2D texture with miplevels - PASS */
/* 2D texture with miplevels - PASS */
TEST_MIP ( 1 , PIPE_TEXTURE_2D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 1 , 4 , 0 ) ,
TEST_MIP ( 1 , PIPE_TEXTURE_2D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 4 , 0 ) ,
/* 2D texture with samples and miplevels - FAIL */
/* 2D texture with samples and miplevels - FAIL */
TEST_MIP ( 1 , PIPE_TEXTURE_2D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , 4 , EINVAL ) ,
TEST_MIP ( 1 , PIPE_TEXTURE_2D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , 4 , EINVAL ) ,
@ -192,7 +192,7 @@ static struct res_test testlist[] = {
/* RECT texture with samples - FAIL */
/* RECT texture with samples - FAIL */
TEST ( 1 , PIPE_TEXTURE_RECT , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , EINVAL ) ,
TEST ( 1 , PIPE_TEXTURE_RECT , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , EINVAL ) ,
/* RECT texture with miplevels - FAIL */
/* RECT texture with miplevels - FAIL */
TEST_MIP ( 1 , PIPE_TEXTURE_RECT , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 1 , 4 , EINVAL ) ,
TEST_MIP ( 1 , PIPE_TEXTURE_RECT , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 4 , EINVAL ) ,
/* 2D texture array - PASS */
/* 2D texture array - PASS */
TEST ( 1 , PIPE_TEXTURE_2D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 0 ) ,
TEST ( 1 , PIPE_TEXTURE_2D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 0 ) ,
@ -205,7 +205,7 @@ static struct res_test testlist[] = {
/* 2D texture with samples - PASS */
/* 2D texture with samples - PASS */
TEST ( 1 , PIPE_TEXTURE_2D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , 0 ) ,
TEST ( 1 , PIPE_TEXTURE_2D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , 0 ) ,
/* 2D texture with miplevels - PASS */
/* 2D texture with miplevels - PASS */
TEST_MIP ( 1 , PIPE_TEXTURE_2D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 1 , 4 , 0 ) ,
TEST_MIP ( 1 , PIPE_TEXTURE_2D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 4 , 0 ) ,
/* 2D texture with samplesmiplevels - FAIL */
/* 2D texture with samplesmiplevels - FAIL */
TEST_MIP ( 1 , PIPE_TEXTURE_2D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , 4 , EINVAL ) ,
TEST_MIP ( 1 , PIPE_TEXTURE_2D_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , 4 , EINVAL ) ,
@ -220,7 +220,7 @@ static struct res_test testlist[] = {
/* 3D texture with samples - FAIL */
/* 3D texture with samples - FAIL */
TEST ( 1 , PIPE_TEXTURE_3D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , EINVAL ) ,
TEST ( 1 , PIPE_TEXTURE_3D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 4 , EINVAL ) ,
/* 3D texture with miplevels - PASS */
/* 3D texture with miplevels - PASS */
TEST_MIP ( 1 , PIPE_TEXTURE_3D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 1 , 4 , 0 ) ,
TEST_MIP ( 1 , PIPE_TEXTURE_3D , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 1 , 0 , 4 , 0 ) ,
/* CUBE texture with array size == 6 - PASS */
/* CUBE texture with array size == 6 - PASS */
TEST ( 1 , PIPE_TEXTURE_CUBE , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 6 , 0 , 0 ) ,
TEST ( 1 , PIPE_TEXTURE_CUBE , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 6 , 0 , 0 ) ,
@ -233,25 +233,25 @@ static struct res_test testlist[] = {
/* CUBE texture with samples - FAIL */
/* CUBE texture with samples - FAIL */
TEST ( 1 , PIPE_TEXTURE_CUBE , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 6 , 4 , EINVAL ) ,
TEST ( 1 , PIPE_TEXTURE_CUBE , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 6 , 4 , EINVAL ) ,
/* CUBE texture with miplevels - PASS */
/* CUBE texture with miplevels - PASS */
TEST_MIP ( 1 , PIPE_TEXTURE_CUBE , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 6 , 1 , 4 , 0 ) ,
TEST_MIP ( 1 , PIPE_TEXTURE_CUBE , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 6 , 0 , 4 , 0 ) ,
} ;
} ;
/* separate since these may fail on a GL that doesn't support cube map arrays */
/* separate since these may fail on a GL that doesn't support cube map arrays */
static struct res_test cubemaparray_testlist [ ] = {
static struct res_test cubemaparray_testlist [ ] = {
/* CUBE array with array size = 6 - PASS */
/* CUBE array with array size = 6 - PASS */
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 6 , 1 , 0 ) ,
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 6 , 0 , 0 ) ,
/* CUBE array with array size = 12 - PASS */
/* CUBE array with array size = 12 - PASS */
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 12 , 1 , 0 ) ,
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 12 , 0 , 0 ) ,
/* CUBE array with array size = 10 - FAIL */
/* CUBE array with array size = 10 - FAIL */
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 10 , 1 , EINVAL ) ,
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 1 , 1 , 10 , 0 , EINVAL ) ,
/* CUBE array with array size = 12 and height - PASS */
/* CUBE array with array size = 12 and height - PASS */
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 50 , 1 , 12 , 1 , 0 ) ,
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 50 , 1 , 12 , 0 , 0 ) ,
/* CUBE array with array size = 12 and depth - FAIL */
/* CUBE array with array size = 12 and depth - FAIL */
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 50 , 5 , 12 , 1 , EINVAL ) ,
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 50 , 5 , 12 , 0 , EINVAL ) ,
/* CUBE array with array size = 12 and samples - FAIL */
/* CUBE array with array size = 12 and samples - FAIL */
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 50 , 1 , 12 , 4 , EINVAL ) ,
TEST ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 50 , 1 , 12 , 4 , EINVAL ) ,
/* CUBE array with array size = 12 and miplevels - PASS */
/* CUBE array with array size = 12 and miplevels - PASS */
TEST_MIP ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 50 , 1 , 12 , 1 , 4 , 0 ) ,
TEST_MIP ( 1 , PIPE_TEXTURE_CUBE_ARRAY , PIPE_FORMAT_B8G8R8X8_UNORM , PIPE_BIND_SAMPLER_VIEW , 50 , 50 , 1 , 12 , 0 , 4 , 0 ) ,
} ;
} ;
START_TEST ( virgl_res_tests )
START_TEST ( virgl_res_tests )