diff options
author | Michael Bien <[email protected]> | 2011-06-15 16:32:27 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-06-15 16:32:27 +0200 |
commit | 4373f933333ecee50dea9686403b6f81759e3b07 (patch) | |
tree | bc3883f431a7e2581c80189c466362bb5d6b31f3 /src/com/jogamp/opencl/CLCommandQueue.java | |
parent | 841d04d5716cbd7ce98a482060c656b1d5050949 (diff) |
internal refactoring to use new binding interfaces in highlevel api impl.
Diffstat (limited to 'src/com/jogamp/opencl/CLCommandQueue.java')
-rw-r--r-- | src/com/jogamp/opencl/CLCommandQueue.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java index b97466d4..858a3a5b 100644 --- a/src/com/jogamp/opencl/CLCommandQueue.java +++ b/src/com/jogamp/opencl/CLCommandQueue.java @@ -32,6 +32,7 @@ import com.jogamp.common.nio.CachedBufferFactory; import com.jogamp.opencl.llb.gl.CLGL; import com.jogamp.common.nio.NativeSizeBuffer; import com.jogamp.opencl.gl.CLGLObject; +import com.jogamp.opencl.llb.CLCommandQueueBinding; import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.IntBuffer; @@ -59,6 +60,7 @@ import static com.jogamp.opencl.util.CLUtil.*; */ public class CLCommandQueue extends CLObject implements CLResource { + private final CLCommandQueueBinding cl; private final CLDevice device; private long properties; @@ -75,21 +77,23 @@ public class CLCommandQueue extends CLObject implements CLResource { this.device = device; this.properties = properties; + this.cl = context.getPlatform().getCommandQueueBinding(); int pbsize = NativeSizeBuffer.elementSize(); CachedBufferFactory factory = CachedBufferFactory.create(9*pbsize + 4, true); - + this.ibA = NativeSizeBuffer.wrap(factory.newDirectByteBuffer(3*pbsize)); this.ibB = NativeSizeBuffer.wrap(factory.newDirectByteBuffer(3*pbsize)); this.ibC = NativeSizeBuffer.wrap(factory.newDirectByteBuffer(3*pbsize)); - + this.pbA = factory.newDirectIntBuffer(1); } static CLCommandQueue create(CLContext context, CLDevice device, long properties) { int[] status = new int[1]; - long id = context.cl.clCreateCommandQueue(context.ID, device.ID, properties, status, 0); + CLCommandQueueBinding binding = context.getPlatform().getCommandQueueBinding(); + long id = binding.clCreateCommandQueue(context.ID, device.ID, properties, status, 0); if(status[0] != CL_SUCCESS) { throw newException(status[0], "can not create command queue on " + device +" with properties: " + Mode.valuesOf(properties)); |