Synchronise with Khronos-private Gitlab branch

The maintenance of the conformance tests is moving to Github.

This commit contains all the changes that have been done in
Gitlab since the first public release of the conformance tests.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
Kevin Petit
2019-02-20 16:10:04 +00:00
committed by Kévin Petit
parent b1603eb6ba
commit 53db6e7f9f
115 changed files with 2632 additions and 1304 deletions

View File

@@ -34,7 +34,8 @@ typedef struct image_kernel_data
cl_int numSamples;
};
static const char *methodTestKernelPattern =
static const char *methodTestKernelPattern =
"%s"
"typedef struct {\n"
" int width;\n"
" int height;\n"
@@ -75,6 +76,8 @@ static const char *channelOrderConstLine =
" outData->expectedChannelOrder = CLK_%s;\n";
static const char *numSamplesKernelLine =
" outData->numSamples = get_image_num_samples( input );\n";
static const char *enableMSAAKernelLine =
"#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable\n";
static int verify(cl_int input, cl_int kernelOutput, const char * description)
{
@@ -185,6 +188,7 @@ int test_image_format_methods( cl_device_id device, cl_context context, cl_comma
bool doImageChannelOrder = false;
bool doImageDim = false;
bool doNumSamples = false;
bool doMSAA = false;
switch(target) {
case GL_TEXTURE_2D:
imageType = "image2d_depth_t";
@@ -206,6 +210,7 @@ int test_image_format_methods( cl_device_id device, cl_context context, cl_comma
break;
case GL_TEXTURE_2D_MULTISAMPLE:
doNumSamples = true;
doMSAA = true;
if(format.formattype == GL_DEPTH_COMPONENT) {
doImageWidth = true;
imageType = "image2d_msaa_depth_t";
@@ -214,6 +219,7 @@ int test_image_format_methods( cl_device_id device, cl_context context, cl_comma
}
break;
case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
doMSAA = true;
if(format.formattype == GL_DEPTH_COMPONENT) {
doImageWidth = true;
imageType = "image2d_msaa_array_depth_t";
@@ -244,9 +250,11 @@ int test_image_format_methods( cl_device_id device, cl_context context, cl_comma
}
}
// Create a program to run against
sprintf( programSrc, methodTestKernelPattern,
imageType,
// Create a program to run against
sprintf(programSrc,
methodTestKernelPattern,
( doMSAA ) ? enableMSAAKernelLine : "",
imageType,
( doArraySize ) ? arraySizeKernelLine : "",
( doImageWidth ) ? imageWidthKernelLine : "",
( doImageHeight ) ? imageHeightKernelLine : "",
@@ -265,7 +273,7 @@ int test_image_format_methods( cl_device_id device, cl_context context, cl_comma
if (error)
print_error(error, "clFinish failed.\n");
const char *ptr = programSrc;
error = create_single_kernel_helper( context, &program, &kernel, 1, &ptr, "sample_kernel" );
error = create_single_kernel_helper_with_build_options( context, &program, &kernel, 1, &ptr, "sample_kernel", "-cl-std=CL2.0" );
test_error( error, "Unable to create kernel to test against" );
// Create an output buffer