MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CTS / sampler_param_test

Function sampler_param_test

test_conformance/api/test_queries.cpp:139–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137
138template <typename T>
139int sampler_param_test(cl_sampler sampler, cl_sampler_info param_name,
140 T expected, const char *name)
141{
142 size_t size;
143 T val;
144 int error = clGetSamplerInfo(sampler, param_name, sizeof(val), &val, &size);
145 test_error(error, "Unable to get sampler info");
146 if (val != expected)
147 {
148 test_fail("ERROR: Sampler %s did not validate!\n", name);
149 }
150 if (size != sizeof(val))
151 {
152 test_fail("ERROR: Returned size of sampler %s does not validate! "
153 "(expected %d, got %d)\n",
154 name, (int)sizeof(val), (int)size);
155 }
156 return 0;
157}
158
159static cl_bool normalized_coord_values[] = { CL_TRUE, CL_FALSE };
160static cl_addressing_mode addressing_mode_values[] = {

Callers 1

test_sampler_paramsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected