org.lwjgl.opengles.AMDPerformanceMonitor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwjgl-opengles Show documentation
Show all versions of lwjgl-opengles Show documentation
A royalty-free, cross-platform API for full-function 2D and 3D graphics on embedded systems - including consoles, phones, appliances and vehicles.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.opengles;
import java.nio.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* Native bindings to the AMD_performance_monitor extension.
*
* This extension enables the capture and reporting of performance monitors. Performance monitors contain groups of counters which hold arbitrary counted
* data. Typically, the counters hold information on performance-related counters in the underlying hardware. The extension is general enough to allow the
* implementation to choose which counters to expose and pick the data type and range of the counters. The extension also allows counting to start and end
* on arbitrary boundaries during rendering.
*/
public class AMDPerformanceMonitor {
/** Accepted by the {@code pame} parameter of GetPerfMonitorCounterInfoAMD. */
public static final int
GL_COUNTER_TYPE_AMD = 0x8BC0,
GL_COUNTER_RANGE_AMD = 0x8BC1;
/** Returned as a valid value in {@code data} parameter of GetPerfMonitorCounterInfoAMD if {@code pname} = COUNTER_TYPE_AMD. */
public static final int
GL_UNSIGNED_INT64_AMD = 0x8BC2,
GL_PERCENTAGE_AMD = 0x8BC3;
/** Accepted by the {@code pname} parameter of GetPerfMonitorCounterDataAMD. */
public static final int
GL_PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4,
GL_PERFMON_RESULT_SIZE_AMD = 0x8BC5,
GL_PERFMON_RESULT_AMD = 0x8BC6;
static { GLES.initialize(); }
protected AMDPerformanceMonitor() {
throw new UnsupportedOperationException();
}
static boolean isAvailable(GLESCapabilities caps) {
return checkFunctions(
caps.glGetPerfMonitorGroupsAMD, caps.glGetPerfMonitorCountersAMD, caps.glGetPerfMonitorGroupStringAMD, caps.glGetPerfMonitorCounterStringAMD,
caps.glGetPerfMonitorCounterInfoAMD, caps.glGenPerfMonitorsAMD, caps.glDeletePerfMonitorsAMD, caps.glSelectPerfMonitorCountersAMD,
caps.glBeginPerfMonitorAMD, caps.glEndPerfMonitorAMD, caps.glGetPerfMonitorCounterDataAMD
);
}
// --- [ glGetPerfMonitorGroupsAMD ] ---
public static native void nglGetPerfMonitorGroupsAMD(long numGroups, int groupsSize, long groups);
public static void glGetPerfMonitorGroupsAMD(@NativeType("GLint *") IntBuffer numGroups, @NativeType("GLuint *") IntBuffer groups) {
if (CHECKS) {
checkSafe(numGroups, 1);
}
nglGetPerfMonitorGroupsAMD(memAddressSafe(numGroups), remainingSafe(groups), memAddressSafe(groups));
}
// --- [ glGetPerfMonitorCountersAMD ] ---
public static native void nglGetPerfMonitorCountersAMD(int group, long numCounters, long maxActiveCounters, int counterSize, long counters);
public static void glGetPerfMonitorCountersAMD(@NativeType("GLuint") int group, @NativeType("GLint *") IntBuffer numCounters, @NativeType("GLint *") IntBuffer maxActiveCounters, @NativeType("GLuint *") IntBuffer counters) {
if (CHECKS) {
check(numCounters, 1);
check(maxActiveCounters, 1);
}
nglGetPerfMonitorCountersAMD(group, memAddress(numCounters), memAddress(maxActiveCounters), counters.remaining(), memAddress(counters));
}
// --- [ glGetPerfMonitorGroupStringAMD ] ---
public static native void nglGetPerfMonitorGroupStringAMD(int group, int bufSize, long length, long groupString);
public static void glGetPerfMonitorGroupStringAMD(@NativeType("GLuint") int group, @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer groupString) {
if (CHECKS) {
check(length, 1);
}
nglGetPerfMonitorGroupStringAMD(group, groupString.remaining(), memAddress(length), memAddress(groupString));
}
// --- [ glGetPerfMonitorCounterStringAMD ] ---
public static native void nglGetPerfMonitorCounterStringAMD(int group, int counter, int bufSize, long length, long counterString);
public static void glGetPerfMonitorCounterStringAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer counterString) {
if (CHECKS) {
checkSafe(length, 1);
}
nglGetPerfMonitorCounterStringAMD(group, counter, remainingSafe(counterString), memAddressSafe(length), memAddressSafe(counterString));
}
// --- [ glGetPerfMonitorCounterInfoAMD ] ---
public static native void nglGetPerfMonitorCounterInfoAMD(int group, int counter, int pname, long data);
public static void glGetPerfMonitorCounterInfoAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLenum") int pname, @NativeType("void *") ByteBuffer data) {
if (CHECKS) {
check(data, 4);
}
nglGetPerfMonitorCounterInfoAMD(group, counter, pname, memAddress(data));
}
public static void glGetPerfMonitorCounterInfoAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLenum") int pname, @NativeType("void *") IntBuffer data) {
if (CHECKS) {
check(data, 4 >> 2);
}
nglGetPerfMonitorCounterInfoAMD(group, counter, pname, memAddress(data));
}
public static void glGetPerfMonitorCounterInfoAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLenum") int pname, @NativeType("void *") FloatBuffer data) {
if (CHECKS) {
check(data, 4 >> 2);
}
nglGetPerfMonitorCounterInfoAMD(group, counter, pname, memAddress(data));
}
// --- [ glGenPerfMonitorsAMD ] ---
public static native void nglGenPerfMonitorsAMD(int n, long monitors);
public static void glGenPerfMonitorsAMD(@NativeType("GLuint *") IntBuffer monitors) {
nglGenPerfMonitorsAMD(monitors.remaining(), memAddress(monitors));
}
@NativeType("void")
public static int glGenPerfMonitorsAMD() {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
IntBuffer monitors = stack.callocInt(1);
nglGenPerfMonitorsAMD(1, memAddress(monitors));
return monitors.get(0);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ glDeletePerfMonitorsAMD ] ---
public static native void nglDeletePerfMonitorsAMD(int n, long monitors);
public static void glDeletePerfMonitorsAMD(@NativeType("GLuint *") IntBuffer monitors) {
nglDeletePerfMonitorsAMD(monitors.remaining(), memAddress(monitors));
}
public static void glDeletePerfMonitorsAMD(@NativeType("GLuint *") int monitor) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
IntBuffer monitors = stack.ints(monitor);
nglDeletePerfMonitorsAMD(1, memAddress(monitors));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ glSelectPerfMonitorCountersAMD ] ---
public static native void nglSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, int numCounters, long counterList);
public static void glSelectPerfMonitorCountersAMD(@NativeType("GLuint") int monitor, @NativeType("GLboolean") boolean enable, @NativeType("GLuint") int group, @NativeType("GLuint *") IntBuffer counterList) {
nglSelectPerfMonitorCountersAMD(monitor, enable, group, counterList.remaining(), memAddress(counterList));
}
// --- [ glBeginPerfMonitorAMD ] ---
public static native void glBeginPerfMonitorAMD(@NativeType("GLuint") int monitor);
// --- [ glEndPerfMonitorAMD ] ---
public static native void glEndPerfMonitorAMD(@NativeType("GLuint") int monitor);
// --- [ glGetPerfMonitorCounterDataAMD ] ---
public static native void nglGetPerfMonitorCounterDataAMD(int monitor, int pname, int dataSize, long data, long bytesWritten);
public static void glGetPerfMonitorCounterDataAMD(@NativeType("GLuint") int monitor, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer data, @NativeType("GLint *") IntBuffer bytesWritten) {
if (CHECKS) {
checkSafe(bytesWritten, 1);
}
nglGetPerfMonitorCounterDataAMD(monitor, pname, data.remaining(), memAddress(data), memAddressSafe(bytesWritten));
}
/** Array version of: {@link #glGetPerfMonitorGroupsAMD GetPerfMonitorGroupsAMD} */
public static void glGetPerfMonitorGroupsAMD(@NativeType("GLint *") int[] numGroups, @NativeType("GLuint *") int[] groups) {
long __functionAddress = GLES.getICD().glGetPerfMonitorGroupsAMD;
if (CHECKS) {
check(__functionAddress);
checkSafe(numGroups, 1);
}
callPPV(__functionAddress, numGroups, lengthSafe(groups), groups);
}
/** Array version of: {@link #glGetPerfMonitorCountersAMD GetPerfMonitorCountersAMD} */
public static void glGetPerfMonitorCountersAMD(@NativeType("GLuint") int group, @NativeType("GLint *") int[] numCounters, @NativeType("GLint *") int[] maxActiveCounters, @NativeType("GLuint *") int[] counters) {
long __functionAddress = GLES.getICD().glGetPerfMonitorCountersAMD;
if (CHECKS) {
check(__functionAddress);
check(numCounters, 1);
check(maxActiveCounters, 1);
}
callPPPV(__functionAddress, group, numCounters, maxActiveCounters, counters.length, counters);
}
/** Array version of: {@link #glGetPerfMonitorGroupStringAMD GetPerfMonitorGroupStringAMD} */
public static void glGetPerfMonitorGroupStringAMD(@NativeType("GLuint") int group, @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer groupString) {
long __functionAddress = GLES.getICD().glGetPerfMonitorGroupStringAMD;
if (CHECKS) {
check(__functionAddress);
check(length, 1);
}
callPPV(__functionAddress, group, groupString.remaining(), length, memAddress(groupString));
}
/** Array version of: {@link #glGetPerfMonitorCounterStringAMD GetPerfMonitorCounterStringAMD} */
public static void glGetPerfMonitorCounterStringAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer counterString) {
long __functionAddress = GLES.getICD().glGetPerfMonitorCounterStringAMD;
if (CHECKS) {
check(__functionAddress);
checkSafe(length, 1);
}
callPPV(__functionAddress, group, counter, remainingSafe(counterString), length, memAddressSafe(counterString));
}
/** Array version of: {@link #glGetPerfMonitorCounterInfoAMD GetPerfMonitorCounterInfoAMD} */
public static void glGetPerfMonitorCounterInfoAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLenum") int pname, @NativeType("void *") int[] data) {
long __functionAddress = GLES.getICD().glGetPerfMonitorCounterInfoAMD;
if (CHECKS) {
check(__functionAddress);
check(data, 4 >> 2);
}
callPV(__functionAddress, group, counter, pname, data);
}
/** Array version of: {@link #glGetPerfMonitorCounterInfoAMD GetPerfMonitorCounterInfoAMD} */
public static void glGetPerfMonitorCounterInfoAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLenum") int pname, @NativeType("void *") float[] data) {
long __functionAddress = GLES.getICD().glGetPerfMonitorCounterInfoAMD;
if (CHECKS) {
check(__functionAddress);
check(data, 4 >> 2);
}
callPV(__functionAddress, group, counter, pname, data);
}
/** Array version of: {@link #glGenPerfMonitorsAMD GenPerfMonitorsAMD} */
public static void glGenPerfMonitorsAMD(@NativeType("GLuint *") int[] monitors) {
long __functionAddress = GLES.getICD().glGenPerfMonitorsAMD;
if (CHECKS) {
check(__functionAddress);
}
callPV(__functionAddress, monitors.length, monitors);
}
/** Array version of: {@link #glDeletePerfMonitorsAMD DeletePerfMonitorsAMD} */
public static void glDeletePerfMonitorsAMD(@NativeType("GLuint *") int[] monitors) {
long __functionAddress = GLES.getICD().glDeletePerfMonitorsAMD;
if (CHECKS) {
check(__functionAddress);
}
callPV(__functionAddress, monitors.length, monitors);
}
/** Array version of: {@link #glSelectPerfMonitorCountersAMD SelectPerfMonitorCountersAMD} */
public static void glSelectPerfMonitorCountersAMD(@NativeType("GLuint") int monitor, @NativeType("GLboolean") boolean enable, @NativeType("GLuint") int group, @NativeType("GLuint *") int[] counterList) {
long __functionAddress = GLES.getICD().glSelectPerfMonitorCountersAMD;
if (CHECKS) {
check(__functionAddress);
}
callPV(__functionAddress, monitor, enable, group, counterList.length, counterList);
}
/** Array version of: {@link #glGetPerfMonitorCounterDataAMD GetPerfMonitorCounterDataAMD} */
public static void glGetPerfMonitorCounterDataAMD(@NativeType("GLuint") int monitor, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] data, @NativeType("GLint *") int[] bytesWritten) {
long __functionAddress = GLES.getICD().glGetPerfMonitorCounterDataAMD;
if (CHECKS) {
check(__functionAddress);
checkSafe(bytesWritten, 1);
}
callPPV(__functionAddress, monitor, pname, data.length, data, bytesWritten);
}
}