mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 22:45:50 +00:00
Added OpenAL & OpenCL generated native paths.
Added support for AMD_device_memory_flags, AMD_offline_devices, AMD_popcnt [OpenCL] Minor bugs fixed in high-level OpenCL API.
This commit is contained in:
parent
1dd8817855
commit
af0ed1d1c4
12 changed files with 147 additions and 13 deletions
|
|
@ -453,7 +453,7 @@ final class APIUtil {
|
|||
*/
|
||||
static void releaseObjects(final CLDevice device) {
|
||||
// Release objects only if we're about to hit 0.
|
||||
if ( device.getReferenceCount() > 1 )
|
||||
if ( !device.isValid() || device.getReferenceCount() > 1 )
|
||||
return;
|
||||
|
||||
releaseObjects(device.getSubCLDeviceRegistry(), DESTRUCTOR_CLSubDevice);
|
||||
|
|
@ -466,7 +466,7 @@ final class APIUtil {
|
|||
*/
|
||||
static void releaseObjects(final CLContext context) {
|
||||
// Release objects only if we're about to hit 0.
|
||||
if ( context.getReferenceCount() > 1 )
|
||||
if ( !context.isValid() || context.getReferenceCount() > 1 )
|
||||
return;
|
||||
|
||||
releaseObjects(context.getCLEventRegistry(), DESTRUCTOR_CLEvent);
|
||||
|
|
@ -483,7 +483,7 @@ final class APIUtil {
|
|||
*/
|
||||
static void releaseObjects(final CLProgram program) {
|
||||
// Release objects only if we're about to hit 0.
|
||||
if ( program.getReferenceCount() > 1 )
|
||||
if ( !program.isValid() || program.getReferenceCount() > 1 )
|
||||
return;
|
||||
|
||||
releaseObjects(program.getCLKernelRegistry(), DESTRUCTOR_CLKernel);
|
||||
|
|
@ -496,7 +496,7 @@ final class APIUtil {
|
|||
*/
|
||||
static void releaseObjects(final CLCommandQueue queue) {
|
||||
// Release objects only if we're about to hit 0.
|
||||
if ( queue.getReferenceCount() > 1 )
|
||||
if ( !queue.isValid() || queue.getReferenceCount() > 1 )
|
||||
return;
|
||||
|
||||
releaseObjects(queue.getCLEventRegistry(), DESTRUCTOR_CLEvent);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ final class InfoUtilFactory {
|
|||
final long user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify);
|
||||
CLContext __result = null;
|
||||
try {
|
||||
__result = new CLContext(nclCreateContext(properties.getBuffer(), 0, devices.size(), properties.getBuffer(), propertyCount * PointerBuffer.getPointerSize(), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, errcode_ret, errcode_ret != null ? errcode_ret.position() : 0, function_pointer), platform);
|
||||
__result = new CLContext(nclCreateContext(properties.getBuffer(), 0, devices.size(), properties.getBuffer(), propertyCount, pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, errcode_ret, errcode_ret != null ? errcode_ret.position() : 0, function_pointer), platform);
|
||||
if ( LWJGLUtil.DEBUG )
|
||||
Util.checkCLError(errcode_ret.get(0));
|
||||
return __result;
|
||||
|
|
|
|||
|
|
@ -395,7 +395,8 @@ public final class SpriteShootoutCL {
|
|||
}
|
||||
|
||||
private void destroy() {
|
||||
clReleaseContext(clContext);
|
||||
if ( clContext != null )
|
||||
clReleaseContext(clContext);
|
||||
Display.destroy();
|
||||
System.exit(0);
|
||||
}
|
||||
|
|
@ -422,7 +423,6 @@ public final class SpriteShootoutCL {
|
|||
|
||||
kernel.setArg(0, SCREEN_WIDTH);
|
||||
kernel.setArg(1, SCREEN_HEIGHT);
|
||||
kernel.setArg(2, ballSize * 0.5f);
|
||||
}
|
||||
|
||||
protected void createProgram(final int vshID) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue