aboutsummaryrefslogtreecommitdiff
path: root/src/api/api_sampler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/api_sampler.cpp')
-rw-r--r--src/api/api_sampler.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/api/api_sampler.cpp b/src/api/api_sampler.cpp
index 6bee50e..08e5d1c 100644
--- a/src/api/api_sampler.cpp
+++ b/src/api/api_sampler.cpp
@@ -71,12 +71,14 @@ clCreateSampler(cl_context d_context,
return 0;
}
- return (cl_sampler)sampler;
+ return desc(sampler);
}
cl_int
-clRetainSampler(cl_sampler sampler)
+clRetainSampler(cl_sampler d_sampler)
{
+ auto sampler = pobj(d_sampler);
+
if (!sampler->isA(Coal::Object::T_Sampler))
return CL_INVALID_SAMPLER;
@@ -86,8 +88,10 @@ clRetainSampler(cl_sampler sampler)
}
cl_int
-clReleaseSampler(cl_sampler sampler)
+clReleaseSampler(cl_sampler d_sampler)
{
+ auto sampler = pobj(d_sampler);
+
if (!sampler->isA(Coal::Object::T_Sampler))
return CL_INVALID_SAMPLER;
@@ -98,12 +102,14 @@ clReleaseSampler(cl_sampler sampler)
}
cl_int
-clGetSamplerInfo(cl_sampler sampler,
+clGetSamplerInfo(cl_sampler d_sampler,
cl_sampler_info param_name,
size_t param_value_size,
void * param_value,
size_t * param_value_size_ret)
{
+ auto sampler = pobj(d_sampler);
+
if (!sampler->isA(Coal::Object::T_Sampler))
return CL_INVALID_SAMPLER;