mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
style
This commit is contained in:
parent
9ba8937f3c
commit
4e540053e9
28 changed files with 2007 additions and 2066 deletions
|
@ -309,7 +309,7 @@ bool LogTrace_ISO15693(const uint8_t *bytes, uint16_t len, uint32_t ts_start, ui
|
|||
// specific LogTrace function for bitstreams: the partial byte size is stored in first parity byte. E.g. bitstream "1100 00100010" -> partial byte: 4 bits
|
||||
bool RAMFUNC LogTraceBits(const uint8_t *btBytes, uint16_t bitLen, uint32_t timestamp_start, uint32_t timestamp_end, bool reader2tag) {
|
||||
|
||||
if ( bitLen == 0 ) {
|
||||
if (bitLen == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1024,7 +1024,7 @@ void SniffHitag2(bool ledcontrol) {
|
|||
lf_init(false, false, ledcontrol);
|
||||
|
||||
// no logging of the raw signal
|
||||
// g_logging = lf_get_reader_modulation();
|
||||
// g_logging = lf_get_reader_modulation();
|
||||
g_logging = false;
|
||||
uint32_t total_count = 0;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ static char *commaprint(size_t n) {
|
|||
static int comma = '\0';
|
||||
static char retbuf[30];
|
||||
|
||||
char *p = &retbuf[sizeof(retbuf)-1];
|
||||
char *p = &retbuf[sizeof(retbuf) - 1];
|
||||
int i = 0;
|
||||
|
||||
if (comma == '\0') {
|
||||
|
@ -65,7 +65,7 @@ static char *commaprint(size_t n) {
|
|||
struct lconv *lcp = localeconv();
|
||||
if (lcp != NULL) {
|
||||
|
||||
if(lcp->thousands_sep != NULL && *lcp->thousands_sep != '\0') {
|
||||
if (lcp->thousands_sep != NULL && *lcp->thousands_sep != '\0') {
|
||||
comma = *lcp->thousands_sep;
|
||||
} else {
|
||||
comma = ',';
|
||||
|
@ -76,7 +76,7 @@ static char *commaprint(size_t n) {
|
|||
*p = '\0';
|
||||
|
||||
do {
|
||||
if ( i % 3 == 0 && i != 0 ) {
|
||||
if (i % 3 == 0 && i != 0) {
|
||||
*--p = comma;
|
||||
}
|
||||
|
||||
|
@ -3288,9 +3288,9 @@ static int CmdNumCon(const char *Cmd) {
|
|||
if (slen) {
|
||||
size_t n = (slen >> 1);
|
||||
uint8_t *d = calloc(n, sizeof(uint8_t));
|
||||
if (d != NULL ) {
|
||||
if (d != NULL) {
|
||||
hexstr_to_byte_array(s, d, &n);
|
||||
PrintAndLogEx(SUCCESS, "ascii... " _YELLOW_("%s"), sprint_ascii((const uint8_t*)d, n));
|
||||
PrintAndLogEx(SUCCESS, "ascii... " _YELLOW_("%s"), sprint_ascii((const uint8_t *)d, n));
|
||||
free(d);
|
||||
}
|
||||
}
|
||||
|
@ -3314,9 +3314,9 @@ static int CmdNumCon(const char *Cmd) {
|
|||
str_reverse(s, strlen(s));
|
||||
size_t n = (slen >> 1);
|
||||
uint8_t *d = calloc(n, sizeof(uint8_t));
|
||||
if (d != NULL ) {
|
||||
if (d != NULL) {
|
||||
hexstr_to_byte_array(s, d, &n);
|
||||
PrintAndLogEx(SUCCESS, "ascii... " _YELLOW_("%s"), sprint_ascii((const uint8_t*)d, n));
|
||||
PrintAndLogEx(SUCCESS, "ascii... " _YELLOW_("%s"), sprint_ascii((const uint8_t *)d, n));
|
||||
free(d);
|
||||
}
|
||||
}
|
||||
|
@ -3353,9 +3353,9 @@ static int CmdNumCon(const char *Cmd) {
|
|||
str_inverse_hex(s, strlen(s));
|
||||
size_t n = (slen >> 1);
|
||||
uint8_t *d = calloc(n, sizeof(uint8_t));
|
||||
if (d != NULL ) {
|
||||
if (d != NULL) {
|
||||
hexstr_to_byte_array(s, d, &n);
|
||||
PrintAndLogEx(SUCCESS, "ascii... " _YELLOW_("%s"), sprint_ascii((const uint8_t*)d, n));
|
||||
PrintAndLogEx(SUCCESS, "ascii... " _YELLOW_("%s"), sprint_ascii((const uint8_t *)d, n));
|
||||
free(d);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7676,7 +7676,7 @@ static int parse_gtu_cfg(uint8_t *d, size_t n) {
|
|||
PrintAndLogEx(INFO, _CYAN_("Config 1 - UID & modes"));
|
||||
PrintAndLogEx(INFO, "%s", sprint_hex_inrow(d, 8));
|
||||
PrintAndLogEx(INFO, "%02X.............. " NOLF, d[0]);
|
||||
bool is_ul_enabled = ( d[0] == 1 );
|
||||
bool is_ul_enabled = (d[0] == 1);
|
||||
switch (d[0]) {
|
||||
case 0x00:
|
||||
PrintAndLogEx(NORMAL, "MIFARE Classic mode");
|
||||
|
@ -7743,16 +7743,16 @@ static int parse_gtu_cfg(uint8_t *d, size_t n) {
|
|||
PrintAndLogEx(INFO, "......%02X........ " NOLF, d[27]);
|
||||
switch (d[27]) {
|
||||
case 0x00:
|
||||
PrintAndLogEx(NORMAL, "%s", (is_ul_enabled) ? _GREEN_("Ultralight EV1") : "Ultralight Ev1" );
|
||||
PrintAndLogEx(NORMAL, "%s", (is_ul_enabled) ? _GREEN_("Ultralight EV1") : "Ultralight Ev1");
|
||||
break;
|
||||
case 0x01:
|
||||
PrintAndLogEx(NORMAL, "%s", (is_ul_enabled) ? _GREEN_("NTAG") : "NTAG" );
|
||||
PrintAndLogEx(NORMAL, "%s", (is_ul_enabled) ? _GREEN_("NTAG") : "NTAG");
|
||||
break;
|
||||
case 0x02:
|
||||
PrintAndLogEx(NORMAL, "%s", (is_ul_enabled) ? _GREEN_("Ultralight C") : "Ultralight C" );
|
||||
PrintAndLogEx(NORMAL, "%s", (is_ul_enabled) ? _GREEN_("Ultralight C") : "Ultralight C");
|
||||
break;
|
||||
case 0x03:
|
||||
PrintAndLogEx(NORMAL, "%s", (is_ul_enabled) ? _GREEN_("Ultralight") : "Ultralight" );
|
||||
PrintAndLogEx(NORMAL, "%s", (is_ul_enabled) ? _GREEN_("Ultralight") : "Ultralight");
|
||||
break;
|
||||
default:
|
||||
PrintAndLogEx(NORMAL, _RED_("unknown"));
|
||||
|
|
|
@ -412,10 +412,10 @@ void annotateHitag2(char *exp, size_t size, const uint8_t *cmd, uint8_t cmdsize,
|
|||
}
|
||||
|
||||
// 11000 AUTH only one with 5 bits. cmdsize 1
|
||||
switch(bn) {
|
||||
switch (bn) {
|
||||
case 5: {
|
||||
_ht2state.state = STATE_HALT;
|
||||
if(memcmp(binstr, HITAG2_START_AUTH, 5) == 0) {
|
||||
if (memcmp(binstr, HITAG2_START_AUTH, 5) == 0) {
|
||||
snprintf(exp, size, "START AUTH");
|
||||
_ht2state.state = STATE_START_AUTH;
|
||||
} else {
|
||||
|
@ -430,22 +430,22 @@ void annotateHitag2(char *exp, size_t size, const uint8_t *cmd, uint8_t cmdsize,
|
|||
break;
|
||||
}
|
||||
|
||||
if(memcmp(binstr, HITAG2_HALT, 2) == 0) {
|
||||
if (memcmp(binstr, HITAG2_HALT, 2) == 0) {
|
||||
snprintf(exp, size, "HALT");
|
||||
_ht2state.state = STATE_HALT;
|
||||
break;
|
||||
}
|
||||
if(memcmp(binstr, HITAG2_READ_PAGE, 2) == 0) {
|
||||
if (memcmp(binstr, HITAG2_READ_PAGE, 2) == 0) {
|
||||
snprintf(exp, size, "READ_PAGE (%u)", 0);
|
||||
break;
|
||||
}
|
||||
|
||||
if(memcmp(binstr, HITAG2_READ_PAGE_INVERTED, 2) == 0) {
|
||||
if (memcmp(binstr, HITAG2_READ_PAGE_INVERTED, 2) == 0) {
|
||||
snprintf(exp, size, "READ_PAGE_INVERTED (%u)", 0);
|
||||
break;
|
||||
}
|
||||
|
||||
if(memcmp(binstr, HITAG2_WRITE_PAGE, 2) == 0) {
|
||||
if (memcmp(binstr, HITAG2_WRITE_PAGE, 2) == 0) {
|
||||
snprintf(exp, size, "WRITE_PAGE ()");
|
||||
break;
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ void annotateHitag2(char *exp, size_t size, const uint8_t *cmd, uint8_t cmdsize,
|
|||
|
||||
if (_ht2state.state == STATE_AUTH) {
|
||||
snprintf(exp, size, "DATA");
|
||||
} else{
|
||||
} else {
|
||||
snprintf(exp, size, "?");
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -124,7 +124,7 @@ static bool WINAPI terminate_handler(DWORD t) {
|
|||
static struct sigaction gs_old_sigint_action;
|
||||
static void sigint_handler(int signum) {
|
||||
|
||||
switch(signum) {
|
||||
switch (signum) {
|
||||
case SIGINT: {
|
||||
sigaction(SIGINT, &gs_old_sigint_action, NULL);
|
||||
pm3line_flush_history();
|
||||
|
|
|
@ -119,6 +119,7 @@ const static vocabulary_t vocabulary[] = {
|
|||
{ 0, "data samples" },
|
||||
{ 1, "data save" },
|
||||
{ 1, "data setdebugmode" },
|
||||
{ 1, "data xor" },
|
||||
{ 1, "emv help" },
|
||||
{ 1, "emv list" },
|
||||
{ 1, "emv test" },
|
||||
|
@ -581,6 +582,7 @@ const static vocabulary_t vocabulary[] = {
|
|||
{ 0, "lf em 410x spoof" },
|
||||
{ 0, "lf em 410x clone" },
|
||||
{ 1, "lf em 4x05 help" },
|
||||
{ 0, "lf em 4x05 clonehelp" },
|
||||
{ 0, "lf em 4x05 brute" },
|
||||
{ 0, "lf em 4x05 chk" },
|
||||
{ 1, "lf em 4x05 config" },
|
||||
|
|
|
@ -1146,7 +1146,7 @@ void binstr_2_bytes(uint8_t *target, size_t *targetlen, const char *src) {
|
|||
}
|
||||
|
||||
void hex_xor(uint8_t *d, uint8_t *x, int n) {
|
||||
while(n--) {
|
||||
while (n--) {
|
||||
d[n] ^= x[n];
|
||||
}
|
||||
}
|
||||
|
@ -1488,7 +1488,7 @@ uint8_t get_highest_frequency(const uint8_t *d, uint8_t n) {
|
|||
uint8_t v = 0;
|
||||
|
||||
// Count the frequency of each byte
|
||||
for(uint8_t i = 0; i < n; i++) {
|
||||
for (uint8_t i = 0; i < n; i++) {
|
||||
frequency[d[i]]++;
|
||||
|
||||
if (frequency[d[i]] > highest) {
|
||||
|
|
|
@ -444,7 +444,7 @@
|
|||
},
|
||||
"data help": {
|
||||
"command": "data help",
|
||||
"description": "----------- ------------------------- General------------------------- help This help ----------- ------------------------- Modulation------------------------- biphaserawdecode Biphase decode bin stream in DemodBuffer detectclock Detect ASK, FSK, NRZ, PSK clock rate of wave in GraphBuffer fsktonrz Convert fsk2 to nrz wave for alternate fsk demodulating (for weak fsk) manrawdecode Manchester decode binary stream in DemodBuffer modulation Identify LF signal for clock and modulation rawdemod Demodulate the data in the GraphBuffer and output binary ----------- ------------------------- Graph------------------------- askedgedetect Adjust Graph for manual ASK demod autocorr Autocorrelation over window dirthreshold Max rising higher up-thres/ Min falling lower down-thres decimate Decimate samples envelope Generate square envelope of samples undecimate Un-decimate samples hide Hide graph window hpf Remove DC offset from trace iir Apply IIR buttersworth filter on plot data grid overlay grid on graph window ltrim Trim samples from left of trace mtrim Trim out samples from the specified start to the specified stop norm Normalize max/min to +/-128 plot Show graph window cthreshold Average out all values between rtrim Trim samples from right of trace setgraphmarkers Set blue and orange marker in graph window shiftgraphzero Shift 0 for Graphed wave + or - shift value timescale Set cursor display timescale zerocrossings Count time between zero-crossings convertbitstream Convert GraphBuffer's 0/1 values to 127 / -127 getbitstream Convert GraphBuffer's >=1 values to 1 and <1 to 0 ----------- ------------------------- Operations------------------------- asn1 ASN1 decoder atr ATR lookup bin2hex Converts binary to hexadecimal bmap Convert hex value according a binary template clear Clears bigbuf on deviceside and graph window crypto Encrypt and decrypt data diff Diff of input files hex2bin Converts hexadecimal to binary load Load contents of file into graph window num Converts dec/hex/bin print Print the data in the DemodBuffer save Save signal trace data (from graph window) setdebugmode Set Debugging Level on client side --------------------------------------------------------------------------------------- data biphaserawdecode available offline: yes Biphase decode binary stream in DemodBuffer Converts 10 or 01 -> 1 and 11 or 00 -> 0 - must have binary sequence in DemodBuffer (run `data rawdemod --ar` before) - invert for Conditional Dephase Encoding (CDP) AKA Differential Manchester",
|
||||
"description": "----------- ------------------------- General------------------------- help This help ----------- ------------------------- Modulation------------------------- biphaserawdecode Biphase decode bin stream in DemodBuffer detectclock Detect ASK, FSK, NRZ, PSK clock rate of wave in GraphBuffer fsktonrz Convert fsk2 to nrz wave for alternate fsk demodulating (for weak fsk) manrawdecode Manchester decode binary stream in DemodBuffer modulation Identify LF signal for clock and modulation rawdemod Demodulate the data in the GraphBuffer and output binary ----------- ------------------------- Graph------------------------- askedgedetect Adjust Graph for manual ASK demod autocorr Autocorrelation over window dirthreshold Max rising higher up-thres/ Min falling lower down-thres decimate Decimate samples envelope Generate square envelope of samples undecimate Un-decimate samples hide Hide graph window hpf Remove DC offset from trace iir Apply IIR buttersworth filter on plot data grid overlay grid on graph window ltrim Trim samples from left of trace mtrim Trim out samples from the specified start to the specified stop norm Normalize max/min to +/-128 plot Show graph window cthreshold Average out all values between rtrim Trim samples from right of trace setgraphmarkers Set blue and orange marker in graph window shiftgraphzero Shift 0 for Graphed wave + or - shift value timescale Set cursor display timescale zerocrossings Count time between zero-crossings convertbitstream Convert GraphBuffer's 0/1 values to 127 / -127 getbitstream Convert GraphBuffer's >=1 values to 1 and <1 to 0 ----------- ------------------------- Operations------------------------- asn1 ASN1 decoder atr ATR lookup bin2hex Converts binary to hexadecimal bmap Convert hex value according a binary template clear Clears bigbuf on deviceside and graph window crypto Encrypt and decrypt data diff Diff of input files hex2bin Converts hexadecimal to binary load Load contents of file into graph window num Converts dec/hex/bin print Print the data in the DemodBuffer save Save signal trace data ( GraphBuffer ) setdebugmode Set Debugging Level on client side xor Xor a input string --------------------------------------------------------------------------------------- data biphaserawdecode available offline: yes Biphase decode binary stream in DemodBuffer Converts 10 or 01 -> 1 and 11 or 00 -> 0 - must have binary sequence in DemodBuffer (run `data rawdemod --ar` before) - invert for Conditional Dephase Encoding (CDP) AKA Differential Manchester",
|
||||
"notes": [
|
||||
"data biphaserawdecode -> decode biphase bitstream from the DemodBuffer",
|
||||
"data biphaserawdecode -oi -> decode biphase bitstream from the DemodBuffer, adjust offset, and invert output"
|
||||
|
@ -542,12 +542,12 @@
|
|||
"command": "data ltrim",
|
||||
"description": "Trim samples from left of trace",
|
||||
"notes": [
|
||||
"data ltrim -i 300 -> keep 300 - end"
|
||||
"data ltrim -i 300 -> remove from start 0 to index 300"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-i, --idx <dec> from index to beginning trace"
|
||||
"-i, --idx <dec> index in graph buffer"
|
||||
],
|
||||
"usage": "data ltrim [-h] -i <dec>"
|
||||
},
|
||||
|
@ -579,9 +579,9 @@
|
|||
},
|
||||
"data mtrim": {
|
||||
"command": "data mtrim",
|
||||
"description": "Trim out samples from the specified start to the specified end point",
|
||||
"description": "Trim out samples from start 0 to `-s index` AND from `-e index` to end of graph buffer",
|
||||
"notes": [
|
||||
"data mtrim -s 1000 -e 2000 -> keep between 1000 and 2000"
|
||||
"data mtrim -s 1000 -e 2000 -> keep all between index 1000 and 2000"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
|
@ -679,12 +679,12 @@
|
|||
"command": "data rtrim",
|
||||
"description": "Trim samples from right of trace",
|
||||
"notes": [
|
||||
"data rtrim -i 4000 -> keep 0 - 4000"
|
||||
"data rtrim -i 4000 -> remove from index 4000 to end of graph buffer"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-i, --idx <dec> from index to end trace"
|
||||
"-i, --idx <dec> index in graph buffer"
|
||||
],
|
||||
"usage": "data rtrim [-h] -i <dec>"
|
||||
},
|
||||
|
@ -792,6 +792,21 @@
|
|||
],
|
||||
"usage": "data undecimate [-h] [-n <dec>]"
|
||||
},
|
||||
"data xor": {
|
||||
"command": "data xor",
|
||||
"description": "takes input string and xor string. Perform xor on it. If no xor string, try the most reoccuring value to xor against",
|
||||
"notes": [
|
||||
"data xor -d 99aabbcc8888888888",
|
||||
"data xor -d 99aabbcc --xor 88888888"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-d, --data <hex> input hex string",
|
||||
"-x, --xor <str> input xor string"
|
||||
],
|
||||
"usage": "data xor [-h] -d <hex> [-x <str>]"
|
||||
},
|
||||
"data zerocrossings": {
|
||||
"command": "data zerocrossings",
|
||||
"description": "Count time between zero-crossings",
|
||||
|
@ -1355,7 +1370,7 @@
|
|||
},
|
||||
"hf 14a sniff": {
|
||||
"command": "hf 14a sniff",
|
||||
"description": "Collect data from the field and save into command buffer. Buffer accessible from command `hf 14a list`",
|
||||
"description": "Sniff the communication between Hitag reader and tag. Use `hf 14a list` to view collected data.",
|
||||
"notes": [
|
||||
"hf 14a sniff -c -r"
|
||||
],
|
||||
|
@ -1544,7 +1559,7 @@
|
|||
},
|
||||
"hf 14b sniff": {
|
||||
"command": "hf 14b sniff",
|
||||
"description": "Sniff the communication reader and tag",
|
||||
"description": "Sniff the communication between reader and tag. Use `hf 14b list` to view collected data.",
|
||||
"notes": [
|
||||
"hf 14b sniff"
|
||||
],
|
||||
|
@ -4582,7 +4597,7 @@
|
|||
"--2k MIFARE Classic/Plus 2k",
|
||||
"--4k MIFARE Classic 4k / S70",
|
||||
"-v, --verbose verbose output",
|
||||
"--sk Save extracted keys to file"
|
||||
"--sk Save extracted keys to binary file"
|
||||
],
|
||||
"usage": "hf mf eview [-hv] [--mini] [--1k] [--2k] [--4k] [--sk]"
|
||||
},
|
||||
|
@ -4753,15 +4768,17 @@
|
|||
"description": "Read info about magic gen4 GTU card.",
|
||||
"notes": [
|
||||
"hf mf ginfo -> get info with default password 00000000",
|
||||
"hf mf ginfo --pwd 01020304 -> get info with password"
|
||||
"hf mf ginfo --pwd 01020304 -> get info with password",
|
||||
"hf mf ginfo -d 00000000000002090978009102BDAC19131011121314151604001800FF0002FD -v -> decode config block"
|
||||
],
|
||||
"offline": false,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-v, --verbose verbose output",
|
||||
"-p, --pwd <hex> password 4bytes"
|
||||
"-p, --pwd <hex> password 4 bytes",
|
||||
"-d, --data <hex> config bytes 32 bytes"
|
||||
],
|
||||
"usage": "hf mf ginfo [-hv] [-p <hex>]"
|
||||
"usage": "hf mf ginfo [-hv] [-p <hex>] [-d <hex>]"
|
||||
},
|
||||
"hf mf gload": {
|
||||
"command": "hf mf gload",
|
||||
|
@ -5263,7 +5280,7 @@
|
|||
"-h, --help This help",
|
||||
"-f, --file <fn> Specify a filename for dump file",
|
||||
"-v, --verbose verbose output",
|
||||
"--sk Save extracted keys to file"
|
||||
"--sk Save extracted keys to binary file"
|
||||
],
|
||||
"usage": "hf mf view [-hv] -f <fn> [--sk]"
|
||||
},
|
||||
|
@ -5763,7 +5780,7 @@
|
|||
"-m, --cmode <plain|mac|encrypt> Communicaton mode",
|
||||
"-c, --ccset <native|niso|iso> Communicaton command set",
|
||||
"--schann <d40|ev1|ev2|lrp> Secure channel",
|
||||
"--aid <hex> Application ID of delegated application (3 hex bytes, big endian)"
|
||||
"--aid <hex> Application ID to delete (3 hex bytes, big endian)"
|
||||
],
|
||||
"usage": "hf mfdes deleteapp [-hav] [-n <dec>] [-t <DES|2TDEA|3TDEA|AES>] [-k <hex>] [--kdf <none|AN10922|gallagher>] [-i <hex>] [-m <plain|mac|encrypt>] [-c <native|niso|iso>] [--schann <d40|ev1|ev2|lrp>] [--aid <hex>]"
|
||||
},
|
||||
|
@ -8466,6 +8483,22 @@
|
|||
],
|
||||
"usage": "lf em 410x watch [-h]"
|
||||
},
|
||||
"lf em 4x05 brute": {
|
||||
"command": "lf em 4x05 brute",
|
||||
"description": "This command tries to bruteforce the password of a EM4205/4305/4469/4569 The loop is running on device side, press Proxmark3 button to abort",
|
||||
"notes": [
|
||||
"Note: if you get many false positives, change position on the antennalf em 4x05 brute",
|
||||
"lf em 4x05 brute -n 1 -> stop after first candidate found",
|
||||
"lf em 4x05 brute -s 000022AA -> start at 000022AA"
|
||||
],
|
||||
"offline": false,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-s, --start <hex> Start bruteforce enumeration from this password value",
|
||||
"-n <dec> Stop after having found n candidates. Default: 0 (infinite)"
|
||||
],
|
||||
"usage": "lf em 4x05 brute [-h] [-s <hex>] [-n <dec>]"
|
||||
},
|
||||
"lf em 4x05 chk": {
|
||||
"command": "lf em 4x05 chk",
|
||||
"description": "This command uses a dictionary attack against EM4205/4305/4469/4569",
|
||||
|
@ -8492,7 +8525,7 @@
|
|||
"options": [
|
||||
"-h, --help This help"
|
||||
],
|
||||
"usage": "lf em ex05 config [-h]"
|
||||
"usage": "lf em 4x05 config [-h]"
|
||||
},
|
||||
"lf em 4x05 demod": {
|
||||
"command": "lf em 4x05 demod",
|
||||
|
@ -8525,19 +8558,15 @@
|
|||
},
|
||||
"lf em 4x05 help": {
|
||||
"command": "lf em 4x05 help",
|
||||
"description": "----------- ----------------------- General ----------------------- help This help ----------- ----------------------- Operations ----------------------- config Create common configuration words demod Demodulate a EM4x05/EM4x69 tag from the GraphBuffer sniff Attempt to recover em4x05 commands from sample buffer view Display content from tag dump file --------------------------------------------------------------------------------------- lf em 4x05 brute available offline: no This command tries to bruteforce the password of a EM4205/4305/4469/4569 The loop is running on device side, press Proxmark3 button to abort",
|
||||
"description": "----------- ----------------------- General ----------------------- help This help ----------- ----------------------- Operations ----------------------- config Create common configuration words demod Demodulate a EM4x05/EM4x69 tag from the GraphBuffer sniff Attempt to recover em4x05 commands from sample buffer view Display content from tag dump file --------------------------------------------------------------------------------------- lf em 4x05 clonehelp available offline: no Display a list of available commands for cloning specific techs on EM4305/4469 tags",
|
||||
"notes": [
|
||||
"Note: if you get many false positives, change position on the antennalf em 4x05 brute",
|
||||
"lf em 4x05 brute -n 1 -> stop after first candidate found",
|
||||
"lf em 4x05 brute -s 000022AA -> start at 000022AA"
|
||||
"lf em 4x05 clonehelp"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-s, --start <hex> Start bruteforce enumeration from this password value",
|
||||
"-n <dec> Stop after having found n candidates. Default: 0 (infinite)"
|
||||
"-h, --help This help"
|
||||
],
|
||||
"usage": "lf em 4x05 brute [-h] [-s <hex>] [-n <dec>]"
|
||||
"usage": "lf em 4x05 clonehelp [-h]"
|
||||
},
|
||||
"lf em 4x05 info": {
|
||||
"command": "lf em 4x05 info",
|
||||
|
@ -8616,7 +8645,7 @@
|
|||
"-f, --file <fn> Specify a filename for dump file",
|
||||
"-v, --verbose Verbose output"
|
||||
],
|
||||
"usage": "lf em ex05 view [-hv] -f <fn>"
|
||||
"usage": "lf em 4x05 view [-hv] -f <fn>"
|
||||
},
|
||||
"lf em 4x05 wipe": {
|
||||
"command": "lf em 4x05 wipe",
|
||||
|
@ -9540,7 +9569,7 @@
|
|||
},
|
||||
"lf hitag sniff": {
|
||||
"command": "lf hitag sniff",
|
||||
"description": "Sniff traffic between Hitag reader and tag. Use `lf hitag list` to view collected data.",
|
||||
"description": "Sniff the communication between reader and tag. Use `lf hitag list` to view collected data.",
|
||||
"notes": [
|
||||
"lf hitag sniff"
|
||||
],
|
||||
|
@ -12566,8 +12595,8 @@
|
|||
}
|
||||
},
|
||||
"metadata": {
|
||||
"commands_extracted": 725,
|
||||
"commands_extracted": 727,
|
||||
"extracted_by": "PM3Help2JSON v1.00",
|
||||
"extracted_on": "2024-03-19T10:15:48"
|
||||
"extracted_on": "2024-04-07T09:37:51"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,9 +135,10 @@ Check column "offline" for their availability.
|
|||
|`data load `|Y |`Load contents of file into graph window`
|
||||
|`data num `|Y |`Converts dec/hex/bin`
|
||||
|`data print `|Y |`Print the data in the DemodBuffer`
|
||||
|`data samples `|N |`Get raw samples for graph window (GraphBuffer)`
|
||||
|`data save `|Y |`Save signal trace data (from graph window)`
|
||||
|`data samples `|N |`Get raw samples for graph window ( GraphBuffer )`
|
||||
|`data save `|Y |`Save signal trace data ( GraphBuffer )`
|
||||
|`data setdebugmode `|Y |`Set Debugging Level on client side`
|
||||
|`data xor `|Y |`Xor a input string`
|
||||
|
||||
|
||||
### emv
|
||||
|
@ -858,7 +859,7 @@ Check column "offline" for their availability.
|
|||
|`lf awid help `|Y |`this help`
|
||||
|`lf awid demod `|Y |`demodulate an AWID FSK tag from the GraphBuffer`
|
||||
|`lf awid reader `|N |`attempt to read and extract tag data`
|
||||
|`lf awid clone `|N |`clone AWID tag to T55x7 or Q5/T5555`
|
||||
|`lf awid clone `|N |`clone AWID tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf awid sim `|N |`simulate AWID tag`
|
||||
|`lf awid brute `|N |`bruteforce card number against reader`
|
||||
|`lf awid watch `|N |`continuously watch for cards. Reader mode`
|
||||
|
@ -884,7 +885,7 @@ Check column "offline" for their availability.
|
|||
|`lf destron help `|Y |`This help`
|
||||
|`lf destron demod `|Y |`demodulate an Destron tag from the GraphBuffer`
|
||||
|`lf destron reader `|N |`attempt to read and extract tag data`
|
||||
|`lf destron clone `|N |`clone Destron tag to T55x7`
|
||||
|`lf destron clone `|N |`clone Destron tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf destron sim `|N |`simulate Destron tag`
|
||||
|
||||
|
||||
|
@ -910,7 +911,7 @@ Check column "offline" for their availability.
|
|||
|`lf em 410x brute `|N |`reader bruteforce attack by simulating EM410x tags`
|
||||
|`lf em 410x watch `|N |`watches for EM410x 125/134 kHz tags`
|
||||
|`lf em 410x spoof `|N |`watches for EM410x 125/134 kHz tags, and replays them`
|
||||
|`lf em 410x clone `|N |`write EM410x Tag ID to T55x7 or Q5/T5555 tag`
|
||||
|`lf em 410x clone `|N |`clone EM410x Tag ID to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|
||||
|
||||
### lf em 4x05
|
||||
|
@ -920,6 +921,7 @@ Check column "offline" for their availability.
|
|||
|command |offline |description
|
||||
|------- |------- |-----------
|
||||
|`lf em 4x05 help `|Y |`This help`
|
||||
|`lf em 4x05 clonehelp `|N |`Shows the available clone commands`
|
||||
|`lf em 4x05 brute `|N |`Bruteforce password`
|
||||
|`lf em 4x05 chk `|N |`Check passwords from dictionary`
|
||||
|`lf em 4x05 config `|Y |`Create common configuration words`
|
||||
|
@ -986,7 +988,7 @@ Check column "offline" for their availability.
|
|||
|`lf fdxb help `|Y |`this help`
|
||||
|`lf fdxb demod `|Y |`demodulate a FDX-B ISO11784/85 tag from the GraphBuffer`
|
||||
|`lf fdxb reader `|N |`attempt to read at 134kHz and extract tag data`
|
||||
|`lf fdxb clone `|N |`clone animal ID tag to T55x7 or Q5/T5555`
|
||||
|`lf fdxb clone `|N |`clone animal ID tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf fdxb sim `|N |`simulate Animal ID tag`
|
||||
|
||||
|
||||
|
@ -999,7 +1001,7 @@ Check column "offline" for their availability.
|
|||
|`lf gallagher help `|Y |`This help`
|
||||
|`lf gallagher demod `|Y |`demodulate an GALLAGHER tag from the GraphBuffer`
|
||||
|`lf gallagher reader `|N |`attempt to read and extract tag data`
|
||||
|`lf gallagher clone `|N |`clone GALLAGHER tag to T55x7`
|
||||
|`lf gallagher clone `|N |`clone GALLAGHER tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf gallagher sim `|N |`simulate GALLAGHER tag`
|
||||
|
||||
|
||||
|
@ -1025,7 +1027,7 @@ Check column "offline" for their availability.
|
|||
|`lf hid help `|Y |`this help`
|
||||
|`lf hid demod `|Y |`demodulate HID Prox tag from the GraphBuffer`
|
||||
|`lf hid reader `|N |`attempt to read and extract tag data`
|
||||
|`lf hid clone `|N |`clone HID tag to T55x7`
|
||||
|`lf hid clone `|N |`clone HID tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf hid sim `|N |`simulate HID tag`
|
||||
|`lf hid brute `|N |`bruteforce facility code or card number against reader`
|
||||
|`lf hid watch `|N |`continuously watch for cards. Reader mode`
|
||||
|
@ -1103,7 +1105,7 @@ Check column "offline" for their availability.
|
|||
|`lf jablotron help `|Y |`This help`
|
||||
|`lf jablotron demod `|Y |`demodulate an Jablotron tag from the GraphBuffer`
|
||||
|`lf jablotron reader `|N |`attempt to read and extract tag data`
|
||||
|`lf jablotron clone `|N |`clone jablotron tag to T55x7 or Q5/T5555`
|
||||
|`lf jablotron clone `|N |`clone jablotron tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf jablotron sim `|N |`simulate jablotron tag`
|
||||
|
||||
|
||||
|
@ -1116,7 +1118,7 @@ Check column "offline" for their availability.
|
|||
|`lf keri help `|Y |`This help`
|
||||
|`lf keri demod `|Y |`demodulate an KERI tag from the GraphBuffer`
|
||||
|`lf keri reader `|N |`attempt to read and extract tag data`
|
||||
|`lf keri clone `|N |`clone KERI tag to T55x7 or Q5/T5555`
|
||||
|`lf keri clone `|N |`clone KERI tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf keri sim `|N |`simulate KERI tag`
|
||||
|
||||
|
||||
|
@ -1142,7 +1144,7 @@ Check column "offline" for their availability.
|
|||
|`lf nedap help `|Y |`This help`
|
||||
|`lf nedap demod `|Y |`demodulate Nedap tag from the GraphBuffer`
|
||||
|`lf nedap reader `|N |`attempt to read and extract tag data`
|
||||
|`lf nedap clone `|N |`clone Nedap tag to T55x7 or Q5/T5555`
|
||||
|`lf nedap clone `|N |`clone Nedap tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf nedap sim `|N |`simulate Nedap tag`
|
||||
|
||||
|
||||
|
@ -1155,7 +1157,7 @@ Check column "offline" for their availability.
|
|||
|`lf nexwatch help `|Y |`This help`
|
||||
|`lf nexwatch demod `|Y |`demodulate a NexWatch tag (nexkey, quadrakey) from the GraphBuffer`
|
||||
|`lf nexwatch reader `|N |`attempt to read and extract tag data`
|
||||
|`lf nexwatch clone `|N |`clone NexWatch tag to T55x7`
|
||||
|`lf nexwatch clone `|N |`clone NexWatch tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf nexwatch sim `|N |`simulate NexWatch tag`
|
||||
|
||||
|
||||
|
@ -1168,7 +1170,7 @@ Check column "offline" for their availability.
|
|||
|`lf noralsy help `|Y |`This help`
|
||||
|`lf noralsy demod `|Y |`demodulate an Noralsy tag from the GraphBuffer`
|
||||
|`lf noralsy reader `|N |`attempt to read and extract tag data`
|
||||
|`lf noralsy clone `|N |`clone Noralsy tag to T55x7 or Q5/T5555`
|
||||
|`lf noralsy clone `|N |`clone Noralsy tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf noralsy sim `|N |`simulate Noralsy tag`
|
||||
|
||||
|
||||
|
@ -1181,7 +1183,7 @@ Check column "offline" for their availability.
|
|||
|`lf pac help `|Y |`This help`
|
||||
|`lf pac demod `|Y |`demodulate a PAC tag from the GraphBuffer`
|
||||
|`lf pac reader `|N |`attempt to read and extract tag data`
|
||||
|`lf pac clone `|N |`clone PAC tag to T55x7`
|
||||
|`lf pac clone `|N |`clone PAC tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf pac sim `|N |`simulate PAC tag`
|
||||
|
||||
|
||||
|
@ -1194,7 +1196,7 @@ Check column "offline" for their availability.
|
|||
|`lf paradox help `|Y |`This help`
|
||||
|`lf paradox demod `|Y |`demodulate a Paradox FSK tag from the GraphBuffer`
|
||||
|`lf paradox reader `|N |`attempt to read and extract tag data`
|
||||
|`lf paradox clone `|N |`clone paradox tag`
|
||||
|`lf paradox clone `|N |`clone paradox tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf paradox sim `|N |`simulate paradox tag`
|
||||
|
||||
|
||||
|
@ -1219,7 +1221,7 @@ Check column "offline" for their availability.
|
|||
|`lf presco help `|Y |`This help`
|
||||
|`lf presco demod `|Y |`demodulate Presco tag from the GraphBuffer`
|
||||
|`lf presco reader `|N |`attempt to read and extract tag data`
|
||||
|`lf presco clone `|N |`clone presco tag to T55x7 or Q5/T5555`
|
||||
|`lf presco clone `|N |`clone presco tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf presco sim `|N |`simulate presco tag`
|
||||
|
||||
|
||||
|
@ -1232,7 +1234,7 @@ Check column "offline" for their availability.
|
|||
|`lf pyramid help `|Y |`this help`
|
||||
|`lf pyramid demod `|Y |`demodulate a Pyramid FSK tag from the GraphBuffer`
|
||||
|`lf pyramid reader `|N |`attempt to read and extract tag data`
|
||||
|`lf pyramid clone `|N |`clone pyramid tag to T55x7 or Q5/T5555`
|
||||
|`lf pyramid clone `|N |`clone pyramid tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf pyramid sim `|N |`simulate pyramid tag`
|
||||
|
||||
|
||||
|
@ -1245,7 +1247,7 @@ Check column "offline" for their availability.
|
|||
|`lf securakey help `|Y |`This help`
|
||||
|`lf securakey demod `|Y |`demodulate an Securakey tag from the GraphBuffer`
|
||||
|`lf securakey reader `|N |`attempt to read and extract tag data`
|
||||
|`lf securakey clone `|N |`clone Securakey tag to T55x7`
|
||||
|`lf securakey clone `|N |`clone Securakey tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf securakey sim `|N |`simulate Securakey tag`
|
||||
|
||||
|
||||
|
@ -1300,7 +1302,7 @@ Check column "offline" for their availability.
|
|||
|`lf viking help `|Y |`This help`
|
||||
|`lf viking demod `|Y |`demodulate a Viking tag from the GraphBuffer`
|
||||
|`lf viking reader `|N |`attempt to read and extract tag data`
|
||||
|`lf viking clone `|N |`clone Viking tag to T55x7 or Q5/T5555`
|
||||
|`lf viking clone `|N |`clone Viking tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf viking sim `|N |`simulate Viking tag`
|
||||
|
||||
|
||||
|
@ -1313,7 +1315,7 @@ Check column "offline" for their availability.
|
|||
|`lf visa2000 help `|Y |`This help`
|
||||
|`lf visa2000 demod `|Y |`demodulate an VISA2000 tag from the GraphBuffer`
|
||||
|`lf visa2000 reader `|N |`attempt to read and extract tag data`
|
||||
|`lf visa2000 clone `|N |`clone Visa2000 tag to T55x7 or Q5/T5555`
|
||||
|`lf visa2000 clone `|N |`clone Visa2000 tag to T55x7, Q5/T5555 or EM4305/4469`
|
||||
|`lf visa2000 sim `|N |`simulate Visa2000 tag`
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -101,11 +101,11 @@ typedef cl_int CL_API_CALL
|
|||
clGetDeviceIDsFromD3D10KHR_t(
|
||||
cl_platform_id platform,
|
||||
cl_d3d10_device_source_khr d3d_device_source,
|
||||
void* d3d_object,
|
||||
void *d3d_object,
|
||||
cl_d3d10_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices);
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices);
|
||||
|
||||
typedef clGetDeviceIDsFromD3D10KHR_t *
|
||||
clGetDeviceIDsFromD3D10KHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -114,8 +114,8 @@ typedef cl_mem CL_API_CALL
|
|||
clCreateFromD3D10BufferKHR_t(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Buffer* resource,
|
||||
cl_int* errcode_ret);
|
||||
ID3D10Buffer *resource,
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromD3D10BufferKHR_t *
|
||||
clCreateFromD3D10BufferKHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -124,9 +124,9 @@ typedef cl_mem CL_API_CALL
|
|||
clCreateFromD3D10Texture2DKHR_t(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture2D* resource,
|
||||
ID3D10Texture2D *resource,
|
||||
UINT subresource,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromD3D10Texture2DKHR_t *
|
||||
clCreateFromD3D10Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -135,9 +135,9 @@ typedef cl_mem CL_API_CALL
|
|||
clCreateFromD3D10Texture3DKHR_t(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture3D* resource,
|
||||
ID3D10Texture3D *resource,
|
||||
UINT subresource,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromD3D10Texture3DKHR_t *
|
||||
clCreateFromD3D10Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -146,10 +146,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueAcquireD3D10ObjectsKHR_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueAcquireD3D10ObjectsKHR_t *
|
||||
clEnqueueAcquireD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -158,10 +158,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueReleaseD3D10ObjectsKHR_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueReleaseD3D10ObjectsKHR_t *
|
||||
clEnqueueReleaseD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -172,52 +172,52 @@ extern CL_API_ENTRY cl_int CL_API_CALL
|
|||
clGetDeviceIDsFromD3D10KHR(
|
||||
cl_platform_id platform,
|
||||
cl_d3d10_device_source_khr d3d_device_source,
|
||||
void* d3d_object,
|
||||
void *d3d_object,
|
||||
cl_d3d10_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0;
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D10BufferKHR(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Buffer* resource,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
ID3D10Buffer *resource,
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D10Texture2DKHR(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture2D* resource,
|
||||
ID3D10Texture2D *resource,
|
||||
UINT subresource,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D10Texture3DKHR(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture3D* resource,
|
||||
ID3D10Texture3D *resource,
|
||||
UINT subresource,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireD3D10ObjectsKHR(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseD3D10ObjectsKHR(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -236,8 +236,8 @@ clGetSupportedD3D10TextureFormatsINTEL_t(
|
|||
cl_mem_flags flags,
|
||||
cl_mem_object_type image_type,
|
||||
cl_uint num_entries,
|
||||
DXGI_FORMAT* d3d10_formats,
|
||||
cl_uint* num_texture_formats);
|
||||
DXGI_FORMAT *d3d10_formats,
|
||||
cl_uint *num_texture_formats);
|
||||
|
||||
typedef clGetSupportedD3D10TextureFormatsINTEL_t *
|
||||
clGetSupportedD3D10TextureFormatsINTEL_fn ;
|
||||
|
@ -250,8 +250,8 @@ clGetSupportedD3D10TextureFormatsINTEL(
|
|||
cl_mem_flags flags,
|
||||
cl_mem_object_type image_type,
|
||||
cl_uint num_entries,
|
||||
DXGI_FORMAT* d3d10_formats,
|
||||
cl_uint* num_texture_formats) ;
|
||||
DXGI_FORMAT *d3d10_formats,
|
||||
cl_uint *num_texture_formats) ;
|
||||
|
||||
#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
|
|
@ -101,11 +101,11 @@ typedef cl_int CL_API_CALL
|
|||
clGetDeviceIDsFromD3D11KHR_t(
|
||||
cl_platform_id platform,
|
||||
cl_d3d11_device_source_khr d3d_device_source,
|
||||
void* d3d_object,
|
||||
void *d3d_object,
|
||||
cl_d3d11_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices);
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices);
|
||||
|
||||
typedef clGetDeviceIDsFromD3D11KHR_t *
|
||||
clGetDeviceIDsFromD3D11KHR_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -114,8 +114,8 @@ typedef cl_mem CL_API_CALL
|
|||
clCreateFromD3D11BufferKHR_t(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Buffer* resource,
|
||||
cl_int* errcode_ret);
|
||||
ID3D11Buffer *resource,
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromD3D11BufferKHR_t *
|
||||
clCreateFromD3D11BufferKHR_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -124,9 +124,9 @@ typedef cl_mem CL_API_CALL
|
|||
clCreateFromD3D11Texture2DKHR_t(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture2D* resource,
|
||||
ID3D11Texture2D *resource,
|
||||
UINT subresource,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromD3D11Texture2DKHR_t *
|
||||
clCreateFromD3D11Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -135,9 +135,9 @@ typedef cl_mem CL_API_CALL
|
|||
clCreateFromD3D11Texture3DKHR_t(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture3D* resource,
|
||||
ID3D11Texture3D *resource,
|
||||
UINT subresource,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromD3D11Texture3DKHR_t *
|
||||
clCreateFromD3D11Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -146,10 +146,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueAcquireD3D11ObjectsKHR_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueAcquireD3D11ObjectsKHR_t *
|
||||
clEnqueueAcquireD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -158,10 +158,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueReleaseD3D11ObjectsKHR_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueReleaseD3D11ObjectsKHR_t *
|
||||
clEnqueueReleaseD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -172,52 +172,52 @@ extern CL_API_ENTRY cl_int CL_API_CALL
|
|||
clGetDeviceIDsFromD3D11KHR(
|
||||
cl_platform_id platform,
|
||||
cl_d3d11_device_source_khr d3d_device_source,
|
||||
void* d3d_object,
|
||||
void *d3d_object,
|
||||
cl_d3d11_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D11BufferKHR(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Buffer* resource,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
ID3D11Buffer *resource,
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D11Texture2DKHR(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture2D* resource,
|
||||
ID3D11Texture2D *resource,
|
||||
UINT subresource,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D11Texture3DKHR(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture3D* resource,
|
||||
ID3D11Texture3D *resource,
|
||||
UINT subresource,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireD3D11ObjectsKHR(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_2;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseD3D11ObjectsKHR(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_2;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -237,8 +237,8 @@ clGetSupportedD3D11TextureFormatsINTEL_t(
|
|||
cl_mem_object_type image_type,
|
||||
cl_uint plane,
|
||||
cl_uint num_entries,
|
||||
DXGI_FORMAT* d3d11_formats,
|
||||
cl_uint* num_texture_formats);
|
||||
DXGI_FORMAT *d3d11_formats,
|
||||
cl_uint *num_texture_formats);
|
||||
|
||||
typedef clGetSupportedD3D11TextureFormatsINTEL_t *
|
||||
clGetSupportedD3D11TextureFormatsINTEL_fn ;
|
||||
|
@ -252,8 +252,8 @@ clGetSupportedD3D11TextureFormatsINTEL(
|
|||
cl_mem_object_type image_type,
|
||||
cl_uint plane,
|
||||
cl_uint num_entries,
|
||||
DXGI_FORMAT* d3d11_formats,
|
||||
cl_uint* num_texture_formats) ;
|
||||
DXGI_FORMAT *d3d11_formats,
|
||||
cl_uint *num_texture_formats) ;
|
||||
|
||||
#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ typedef cl_uint cl_dx9_media_adapter_set_khr;
|
|||
|
||||
#if defined(_WIN32)
|
||||
typedef struct _cl_dx9_surface_info_khr {
|
||||
IDirect3DSurface9* resource;
|
||||
IDirect3DSurface9 *resource;
|
||||
HANDLE shared_handle;
|
||||
} cl_dx9_surface_info_khr;
|
||||
|
||||
|
@ -114,12 +114,12 @@ typedef cl_int CL_API_CALL
|
|||
clGetDeviceIDsFromDX9MediaAdapterKHR_t(
|
||||
cl_platform_id platform,
|
||||
cl_uint num_media_adapters,
|
||||
cl_dx9_media_adapter_type_khr* media_adapter_type,
|
||||
void* media_adapters,
|
||||
cl_dx9_media_adapter_type_khr *media_adapter_type,
|
||||
void *media_adapters,
|
||||
cl_dx9_media_adapter_set_khr media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices);
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices);
|
||||
|
||||
typedef clGetDeviceIDsFromDX9MediaAdapterKHR_t *
|
||||
clGetDeviceIDsFromDX9MediaAdapterKHR_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -129,9 +129,9 @@ clCreateFromDX9MediaSurfaceKHR_t(
|
|||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_dx9_media_adapter_type_khr adapter_type,
|
||||
void* surface_info,
|
||||
void *surface_info,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromDX9MediaSurfaceKHR_t *
|
||||
clCreateFromDX9MediaSurfaceKHR_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -140,10 +140,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueAcquireDX9MediaSurfacesKHR_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueAcquireDX9MediaSurfacesKHR_t *
|
||||
clEnqueueAcquireDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -152,10 +152,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueReleaseDX9MediaSurfacesKHR_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueReleaseDX9MediaSurfacesKHR_t *
|
||||
clEnqueueReleaseDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -166,39 +166,39 @@ extern CL_API_ENTRY cl_int CL_API_CALL
|
|||
clGetDeviceIDsFromDX9MediaAdapterKHR(
|
||||
cl_platform_id platform,
|
||||
cl_uint num_media_adapters,
|
||||
cl_dx9_media_adapter_type_khr* media_adapter_type,
|
||||
void* media_adapters,
|
||||
cl_dx9_media_adapter_type_khr *media_adapter_type,
|
||||
void *media_adapters,
|
||||
cl_dx9_media_adapter_set_khr media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromDX9MediaSurfaceKHR(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_dx9_media_adapter_type_khr adapter_type,
|
||||
void* surface_info,
|
||||
void *surface_info,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireDX9MediaSurfacesKHR(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_2;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseDX9MediaSurfacesKHR(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_2;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -248,11 +248,11 @@ typedef cl_int CL_API_CALL
|
|||
clGetDeviceIDsFromDX9INTEL_t(
|
||||
cl_platform_id platform,
|
||||
cl_dx9_device_source_intel dx9_device_source,
|
||||
void* dx9_object,
|
||||
void *dx9_object,
|
||||
cl_dx9_device_set_intel dx9_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices);
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices);
|
||||
|
||||
typedef clGetDeviceIDsFromDX9INTEL_t *
|
||||
clGetDeviceIDsFromDX9INTEL_fn CL_API_SUFFIX__VERSION_1_1;
|
||||
|
@ -261,10 +261,10 @@ typedef cl_mem CL_API_CALL
|
|||
clCreateFromDX9MediaSurfaceINTEL_t(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
IDirect3DSurface9* resource,
|
||||
IDirect3DSurface9 *resource,
|
||||
HANDLE sharedHandle,
|
||||
UINT plane,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromDX9MediaSurfaceINTEL_t *
|
||||
clCreateFromDX9MediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_1;
|
||||
|
@ -273,10 +273,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueAcquireDX9ObjectsINTEL_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueAcquireDX9ObjectsINTEL_t *
|
||||
clEnqueueAcquireDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1;
|
||||
|
@ -285,10 +285,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueReleaseDX9ObjectsINTEL_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
cl_mem* mem_objects,
|
||||
cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueReleaseDX9ObjectsINTEL_t *
|
||||
clEnqueueReleaseDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1;
|
||||
|
@ -299,38 +299,38 @@ extern CL_API_ENTRY cl_int CL_API_CALL
|
|||
clGetDeviceIDsFromDX9INTEL(
|
||||
cl_platform_id platform,
|
||||
cl_dx9_device_source_intel dx9_device_source,
|
||||
void* dx9_object,
|
||||
void *dx9_object,
|
||||
cl_dx9_device_set_intel dx9_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_1;
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromDX9MediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
IDirect3DSurface9* resource,
|
||||
IDirect3DSurface9 *resource,
|
||||
HANDLE sharedHandle,
|
||||
UINT plane,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireDX9ObjectsINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_1;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseDX9ObjectsINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
cl_mem* mem_objects,
|
||||
cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_1;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -350,8 +350,8 @@ clGetSupportedDX9MediaSurfaceFormatsINTEL_t(
|
|||
cl_mem_object_type image_type,
|
||||
cl_uint plane,
|
||||
cl_uint num_entries,
|
||||
D3DFORMAT* dx9_formats,
|
||||
cl_uint* num_surface_formats);
|
||||
D3DFORMAT *dx9_formats,
|
||||
cl_uint *num_surface_formats);
|
||||
|
||||
typedef clGetSupportedDX9MediaSurfaceFormatsINTEL_t *
|
||||
clGetSupportedDX9MediaSurfaceFormatsINTEL_fn ;
|
||||
|
@ -365,8 +365,8 @@ clGetSupportedDX9MediaSurfaceFormatsINTEL(
|
|||
cl_mem_object_type image_type,
|
||||
cl_uint plane,
|
||||
cl_uint num_entries,
|
||||
D3DFORMAT* dx9_formats,
|
||||
cl_uint* num_surface_formats) ;
|
||||
D3DFORMAT *dx9_formats,
|
||||
cl_uint *num_surface_formats) ;
|
||||
|
||||
#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
|
|
@ -61,10 +61,10 @@ extern "C" {
|
|||
#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
|
||||
|
||||
/* CLeglImageKHR is an opaque handle to an EGLImage */
|
||||
typedef void* CLeglImageKHR;
|
||||
typedef void *CLeglImageKHR;
|
||||
|
||||
/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
|
||||
typedef void* CLeglDisplayKHR;
|
||||
typedef void *CLeglDisplayKHR;
|
||||
|
||||
/* properties passed to clCreateFromEGLImageKHR */
|
||||
typedef intptr_t cl_egl_image_properties_khr;
|
||||
|
@ -76,8 +76,8 @@ clCreateFromEGLImageKHR_t(
|
|||
CLeglDisplayKHR egldisplay,
|
||||
CLeglImageKHR eglimage,
|
||||
cl_mem_flags flags,
|
||||
const cl_egl_image_properties_khr* properties,
|
||||
cl_int* errcode_ret);
|
||||
const cl_egl_image_properties_khr *properties,
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromEGLImageKHR_t *
|
||||
clCreateFromEGLImageKHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -86,10 +86,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueAcquireEGLObjectsKHR_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueAcquireEGLObjectsKHR_t *
|
||||
clEnqueueAcquireEGLObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -98,10 +98,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueReleaseEGLObjectsKHR_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueReleaseEGLObjectsKHR_t *
|
||||
clEnqueueReleaseEGLObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -114,26 +114,26 @@ clCreateFromEGLImageKHR(
|
|||
CLeglDisplayKHR egldisplay,
|
||||
CLeglImageKHR eglimage,
|
||||
cl_mem_flags flags,
|
||||
const cl_egl_image_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
const cl_egl_image_properties_khr *properties,
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireEGLObjectsKHR(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseEGLObjectsKHR(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -148,7 +148,7 @@ clEnqueueReleaseEGLObjectsKHR(
|
|||
/* type CLeglDisplayKHR */
|
||||
|
||||
/* CLeglSyncKHR is an opaque handle to an EGLSync object */
|
||||
typedef void* CLeglSyncKHR;
|
||||
typedef void *CLeglSyncKHR;
|
||||
|
||||
|
||||
typedef cl_event CL_API_CALL
|
||||
|
@ -156,7 +156,7 @@ clCreateEventFromEGLSyncKHR_t(
|
|||
cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateEventFromEGLSyncKHR_t *
|
||||
clCreateEventFromEGLSyncKHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -168,7 +168,7 @@ clCreateEventFromEGLSyncKHR(
|
|||
cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -93,11 +93,11 @@ typedef cl_uint cl_gl_platform_info;
|
|||
|
||||
typedef cl_int CL_API_CALL
|
||||
clGetGLContextInfoKHR_t(
|
||||
const cl_context_properties* properties,
|
||||
const cl_context_properties *properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret);
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
|
||||
typedef clGetGLContextInfoKHR_t *
|
||||
clGetGLContextInfoKHR_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -107,7 +107,7 @@ clCreateFromGLBuffer_t(
|
|||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint bufobj,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromGLBuffer_t *
|
||||
clCreateFromGLBuffer_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -116,18 +116,18 @@ clCreateFromGLBuffer_fn CL_API_SUFFIX__VERSION_1_0;
|
|||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLContextInfoKHR(
|
||||
const cl_context_properties* properties,
|
||||
const cl_context_properties *properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLBuffer(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint bufobj,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -140,7 +140,7 @@ clCreateFromGLTexture_t(
|
|||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromGLTexture_t *
|
||||
clCreateFromGLTexture_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -154,7 +154,7 @@ clCreateFromGLTexture(
|
|||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -166,7 +166,7 @@ clCreateFromGLRenderbuffer_t(
|
|||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint renderbuffer,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromGLRenderbuffer_t *
|
||||
clCreateFromGLRenderbuffer_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -174,8 +174,8 @@ clCreateFromGLRenderbuffer_fn CL_API_SUFFIX__VERSION_1_0;
|
|||
typedef cl_int CL_API_CALL
|
||||
clGetGLObjectInfo_t(
|
||||
cl_mem memobj,
|
||||
cl_gl_object_type* gl_object_type,
|
||||
cl_GLuint* gl_object_name);
|
||||
cl_gl_object_type *gl_object_type,
|
||||
cl_GLuint *gl_object_name);
|
||||
|
||||
typedef clGetGLObjectInfo_t *
|
||||
clGetGLObjectInfo_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -185,8 +185,8 @@ clGetGLTextureInfo_t(
|
|||
cl_mem memobj,
|
||||
cl_gl_texture_info param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret);
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
|
||||
typedef clGetGLTextureInfo_t *
|
||||
clGetGLTextureInfo_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -195,10 +195,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueAcquireGLObjects_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueAcquireGLObjects_t *
|
||||
clEnqueueAcquireGLObjects_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -207,10 +207,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueReleaseGLObjects_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueReleaseGLObjects_t *
|
||||
clEnqueueReleaseGLObjects_fn CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -222,39 +222,39 @@ clCreateFromGLRenderbuffer(
|
|||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint renderbuffer,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLObjectInfo(
|
||||
cl_mem memobj,
|
||||
cl_gl_object_type* gl_object_type,
|
||||
cl_GLuint* gl_object_name) CL_API_SUFFIX__VERSION_1_0;
|
||||
cl_gl_object_type *gl_object_type,
|
||||
cl_GLuint *gl_object_name) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLTextureInfo(
|
||||
cl_mem memobj,
|
||||
cl_gl_texture_info param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireGLObjects(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseGLObjects(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_0;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -267,7 +267,7 @@ clCreateFromGLTexture2D_t(
|
|||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromGLTexture2D_t *
|
||||
clCreateFromGLTexture2D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
@ -279,7 +279,7 @@ clCreateFromGLTexture3D_t(
|
|||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromGLTexture3D_t *
|
||||
clCreateFromGLTexture3D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
@ -293,7 +293,7 @@ clCreateFromGLTexture2D(
|
|||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture3D(
|
||||
|
@ -302,7 +302,7 @@ clCreateFromGLTexture3D(
|
|||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -313,7 +313,7 @@ clCreateFromGLTexture3D(
|
|||
#define CL_KHR_GL_EVENT_EXTENSION_NAME \
|
||||
"cl_khr_gl_event"
|
||||
|
||||
typedef struct __GLsync * cl_GLsync;
|
||||
typedef struct __GLsync *cl_GLsync;
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
|
||||
|
@ -323,7 +323,7 @@ typedef cl_event CL_API_CALL
|
|||
clCreateEventFromGLsyncKHR_t(
|
||||
cl_context context,
|
||||
cl_GLsync sync,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateEventFromGLsyncKHR_t *
|
||||
clCreateEventFromGLsyncKHR_fn CL_API_SUFFIX__VERSION_1_1;
|
||||
|
@ -334,7 +334,7 @@ extern CL_API_ENTRY cl_event CL_API_CALL
|
|||
clCreateEventFromGLsyncKHR(
|
||||
cl_context context,
|
||||
cl_GLsync sync,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -376,8 +376,8 @@ clGetSupportedGLTextureFormatsINTEL_t(
|
|||
cl_mem_flags flags,
|
||||
cl_mem_object_type image_type,
|
||||
cl_uint num_entries,
|
||||
cl_GLenum* gl_formats,
|
||||
cl_uint* num_texture_formats);
|
||||
cl_GLenum *gl_formats,
|
||||
cl_uint *num_texture_formats);
|
||||
|
||||
typedef clGetSupportedGLTextureFormatsINTEL_t *
|
||||
clGetSupportedGLTextureFormatsINTEL_fn ;
|
||||
|
@ -390,8 +390,8 @@ clGetSupportedGLTextureFormatsINTEL(
|
|||
cl_mem_flags flags,
|
||||
cl_mem_object_type image_type,
|
||||
cl_uint num_entries,
|
||||
cl_GLenum* gl_formats,
|
||||
cl_uint* num_texture_formats) ;
|
||||
cl_GLenum *gl_formats,
|
||||
cl_uint *num_texture_formats) ;
|
||||
|
||||
#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
|
|
@ -41,8 +41,7 @@ extern "C" {
|
|||
/**
|
||||
* Rounding mode used when converting to cl_half.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
CL_HALF_RTE, // round to nearest even
|
||||
CL_HALF_RTZ, // round towards zero
|
||||
CL_HALF_RTP, // round towards positive infinity
|
||||
|
@ -59,20 +58,14 @@ typedef enum
|
|||
* Utility to deal with values that overflow when converting to half precision.
|
||||
*/
|
||||
static inline cl_half cl_half_handle_overflow(cl_half_rounding_mode rounding_mode,
|
||||
uint16_t sign)
|
||||
{
|
||||
if (rounding_mode == CL_HALF_RTZ)
|
||||
{
|
||||
uint16_t sign) {
|
||||
if (rounding_mode == CL_HALF_RTZ) {
|
||||
// Round overflow towards zero -> largest finite number (preserving sign)
|
||||
return (sign << 15) | CL_HALF_MAX_FINITE_MAG;
|
||||
}
|
||||
else if (rounding_mode == CL_HALF_RTP && sign)
|
||||
{
|
||||
} else if (rounding_mode == CL_HALF_RTP && sign) {
|
||||
// Round negative overflow towards positive infinity -> most negative finite number
|
||||
return (1 << 15) | CL_HALF_MAX_FINITE_MAG;
|
||||
}
|
||||
else if (rounding_mode == CL_HALF_RTN && !sign)
|
||||
{
|
||||
} else if (rounding_mode == CL_HALF_RTN && !sign) {
|
||||
// Round positive overflow towards negative infinity -> largest finite number
|
||||
return CL_HALF_MAX_FINITE_MAG;
|
||||
}
|
||||
|
@ -85,15 +78,11 @@ static inline cl_half cl_half_handle_overflow(cl_half_rounding_mode rounding_mod
|
|||
* Utility to deal with values that underflow when converting to half precision.
|
||||
*/
|
||||
static inline cl_half cl_half_handle_underflow(cl_half_rounding_mode rounding_mode,
|
||||
uint16_t sign)
|
||||
{
|
||||
if (rounding_mode == CL_HALF_RTP && !sign)
|
||||
{
|
||||
uint16_t sign) {
|
||||
if (rounding_mode == CL_HALF_RTP && !sign) {
|
||||
// Round underflow towards positive infinity -> smallest positive value
|
||||
return (sign << 15) | 1;
|
||||
}
|
||||
else if (rounding_mode == CL_HALF_RTN && sign)
|
||||
{
|
||||
} else if (rounding_mode == CL_HALF_RTN && sign) {
|
||||
// Round underflow towards negative infinity -> largest negative value
|
||||
return (sign << 15) | 1;
|
||||
}
|
||||
|
@ -106,11 +95,9 @@ static inline cl_half cl_half_handle_underflow(cl_half_rounding_mode rounding_mo
|
|||
/**
|
||||
* Convert a cl_float to a cl_half.
|
||||
*/
|
||||
static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode rounding_mode)
|
||||
{
|
||||
static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode rounding_mode) {
|
||||
// Type-punning to get direct access to underlying bits
|
||||
union
|
||||
{
|
||||
union {
|
||||
cl_float f;
|
||||
uint32_t i;
|
||||
} f32;
|
||||
|
@ -133,43 +120,35 @@ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode round
|
|||
uint32_t lsb_pos = CL_FLT_MANT_DIG - CL_HALF_MANT_DIG;
|
||||
|
||||
// Check for NaN / infinity
|
||||
if (f_exp == 0xFF)
|
||||
{
|
||||
if (f_mant)
|
||||
{
|
||||
if (f_exp == 0xFF) {
|
||||
if (f_mant) {
|
||||
// NaN -> propagate mantissa and silence it
|
||||
uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
|
||||
h_mant |= 0x200;
|
||||
return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Infinity -> zero mantissa
|
||||
return (sign << 15) | CL_HALF_EXP_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for zero
|
||||
if (!f_exp && !f_mant)
|
||||
{
|
||||
if (!f_exp && !f_mant) {
|
||||
return (sign << 15);
|
||||
}
|
||||
|
||||
// Check for overflow
|
||||
if (exp >= CL_HALF_MAX_EXP)
|
||||
{
|
||||
if (exp >= CL_HALF_MAX_EXP) {
|
||||
return cl_half_handle_overflow(rounding_mode, sign);
|
||||
}
|
||||
|
||||
// Check for underflow
|
||||
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
|
||||
{
|
||||
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1)) {
|
||||
return cl_half_handle_underflow(rounding_mode, sign);
|
||||
}
|
||||
|
||||
// Check for value that will become denormal
|
||||
if (exp < -14)
|
||||
{
|
||||
if (exp < -14) {
|
||||
// Denormal -> include the implicit 1 from the FP32 mantissa
|
||||
h_exp = 0;
|
||||
f_mant |= 1 << (CL_FLT_MANT_DIG - 1);
|
||||
|
@ -184,16 +163,12 @@ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode round
|
|||
// Check whether we need to round
|
||||
uint32_t halfway = 1 << (lsb_pos - 1);
|
||||
uint32_t mask = (halfway << 1) - 1;
|
||||
switch (rounding_mode)
|
||||
{
|
||||
switch (rounding_mode) {
|
||||
case CL_HALF_RTE:
|
||||
if ((f_mant & mask) > halfway)
|
||||
{
|
||||
if ((f_mant & mask) > halfway) {
|
||||
// More than halfway -> round up
|
||||
h_mant += 1;
|
||||
}
|
||||
else if ((f_mant & mask) == halfway)
|
||||
{
|
||||
} else if ((f_mant & mask) == halfway) {
|
||||
// Exactly halfway -> round to nearest even
|
||||
if (h_mant & 0x1)
|
||||
h_mant += 1;
|
||||
|
@ -203,15 +178,13 @@ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode round
|
|||
// Mantissa has already been truncated -> do nothing
|
||||
break;
|
||||
case CL_HALF_RTP:
|
||||
if ((f_mant & mask) && !sign)
|
||||
{
|
||||
if ((f_mant & mask) && !sign) {
|
||||
// Round positive numbers up
|
||||
h_mant += 1;
|
||||
}
|
||||
break;
|
||||
case CL_HALF_RTN:
|
||||
if ((f_mant & mask) && sign)
|
||||
{
|
||||
if ((f_mant & mask) && sign) {
|
||||
// Round negative numbers down
|
||||
h_mant += 1;
|
||||
}
|
||||
|
@ -219,8 +192,7 @@ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode round
|
|||
}
|
||||
|
||||
// Check for mantissa overflow
|
||||
if (h_mant & 0x400)
|
||||
{
|
||||
if (h_mant & 0x400) {
|
||||
h_exp += 1;
|
||||
h_mant = 0;
|
||||
}
|
||||
|
@ -232,11 +204,9 @@ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode round
|
|||
/**
|
||||
* Convert a cl_double to a cl_half.
|
||||
*/
|
||||
static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rounding_mode)
|
||||
{
|
||||
static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rounding_mode) {
|
||||
// Type-punning to get direct access to underlying bits
|
||||
union
|
||||
{
|
||||
union {
|
||||
cl_double d;
|
||||
uint64_t i;
|
||||
} f64;
|
||||
|
@ -259,43 +229,35 @@ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rou
|
|||
uint32_t lsb_pos = CL_DBL_MANT_DIG - CL_HALF_MANT_DIG;
|
||||
|
||||
// Check for NaN / infinity
|
||||
if (d_exp == 0x7FF)
|
||||
{
|
||||
if (d_mant)
|
||||
{
|
||||
if (d_exp == 0x7FF) {
|
||||
if (d_mant) {
|
||||
// NaN -> propagate mantissa and silence it
|
||||
uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos);
|
||||
h_mant |= 0x200;
|
||||
return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Infinity -> zero mantissa
|
||||
return (sign << 15) | CL_HALF_EXP_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for zero
|
||||
if (!d_exp && !d_mant)
|
||||
{
|
||||
if (!d_exp && !d_mant) {
|
||||
return (sign << 15);
|
||||
}
|
||||
|
||||
// Check for overflow
|
||||
if (exp >= CL_HALF_MAX_EXP)
|
||||
{
|
||||
if (exp >= CL_HALF_MAX_EXP) {
|
||||
return cl_half_handle_overflow(rounding_mode, sign);
|
||||
}
|
||||
|
||||
// Check for underflow
|
||||
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
|
||||
{
|
||||
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1)) {
|
||||
return cl_half_handle_underflow(rounding_mode, sign);
|
||||
}
|
||||
|
||||
// Check for value that will become denormal
|
||||
if (exp < -14)
|
||||
{
|
||||
if (exp < -14) {
|
||||
// Include the implicit 1 from the FP64 mantissa
|
||||
h_exp = 0;
|
||||
d_mant |= (uint64_t)1 << (CL_DBL_MANT_DIG - 1);
|
||||
|
@ -310,16 +272,12 @@ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rou
|
|||
// Check whether we need to round
|
||||
uint64_t halfway = (uint64_t)1 << (lsb_pos - 1);
|
||||
uint64_t mask = (halfway << 1) - 1;
|
||||
switch (rounding_mode)
|
||||
{
|
||||
switch (rounding_mode) {
|
||||
case CL_HALF_RTE:
|
||||
if ((d_mant & mask) > halfway)
|
||||
{
|
||||
if ((d_mant & mask) > halfway) {
|
||||
// More than halfway -> round up
|
||||
h_mant += 1;
|
||||
}
|
||||
else if ((d_mant & mask) == halfway)
|
||||
{
|
||||
} else if ((d_mant & mask) == halfway) {
|
||||
// Exactly halfway -> round to nearest even
|
||||
if (h_mant & 0x1)
|
||||
h_mant += 1;
|
||||
|
@ -329,15 +287,13 @@ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rou
|
|||
// Mantissa has already been truncated -> do nothing
|
||||
break;
|
||||
case CL_HALF_RTP:
|
||||
if ((d_mant & mask) && !sign)
|
||||
{
|
||||
if ((d_mant & mask) && !sign) {
|
||||
// Round positive numbers up
|
||||
h_mant += 1;
|
||||
}
|
||||
break;
|
||||
case CL_HALF_RTN:
|
||||
if ((d_mant & mask) && sign)
|
||||
{
|
||||
if ((d_mant & mask) && sign) {
|
||||
// Round negative numbers down
|
||||
h_mant += 1;
|
||||
}
|
||||
|
@ -345,8 +301,7 @@ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rou
|
|||
}
|
||||
|
||||
// Check for mantissa overflow
|
||||
if (h_mant & 0x400)
|
||||
{
|
||||
if (h_mant & 0x400) {
|
||||
h_exp += 1;
|
||||
h_mant = 0;
|
||||
}
|
||||
|
@ -358,11 +313,9 @@ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rou
|
|||
/**
|
||||
* Convert a cl_half to a cl_float.
|
||||
*/
|
||||
static inline cl_float cl_half_to_float(cl_half h)
|
||||
{
|
||||
static inline cl_float cl_half_to_float(cl_half h) {
|
||||
// Type-punning to get direct access to underlying bits
|
||||
union
|
||||
{
|
||||
union {
|
||||
cl_float f;
|
||||
uint32_t i;
|
||||
} f32;
|
||||
|
@ -381,18 +334,14 @@ static inline cl_float cl_half_to_float(cl_half h)
|
|||
uint32_t f_exp = exp + CL_FLT_MAX_EXP - 1;
|
||||
|
||||
// Check for NaN / infinity
|
||||
if (h_exp == 0x1F)
|
||||
{
|
||||
if (h_mant)
|
||||
{
|
||||
if (h_exp == 0x1F) {
|
||||
if (h_mant) {
|
||||
// NaN -> propagate mantissa and silence it
|
||||
uint32_t f_mant = h_mant << (CL_FLT_MANT_DIG - CL_HALF_MANT_DIG);
|
||||
f_mant |= 0x400000;
|
||||
f32.i = (sign << 31) | 0x7F800000 | f_mant;
|
||||
return f32.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Infinity -> zero mantissa
|
||||
f32.i = (sign << 31) | 0x7F800000;
|
||||
return f32.f;
|
||||
|
@ -400,21 +349,16 @@ static inline cl_float cl_half_to_float(cl_half h)
|
|||
}
|
||||
|
||||
// Check for zero / denormal
|
||||
if (h_exp == 0)
|
||||
{
|
||||
if (h_mant == 0)
|
||||
{
|
||||
if (h_exp == 0) {
|
||||
if (h_mant == 0) {
|
||||
// Zero -> zero exponent
|
||||
f_exp = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Denormal -> normalize it
|
||||
// - Shift mantissa to make most-significant 1 implicit
|
||||
// - Adjust exponent accordingly
|
||||
uint32_t shift = 0;
|
||||
while ((h_mant & 0x400) == 0)
|
||||
{
|
||||
while ((h_mant & 0x400) == 0) {
|
||||
h_mant <<= 1;
|
||||
shift++;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -62,8 +62,8 @@ clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t(
|
|||
cl_mem_object_type image_type,
|
||||
cl_uint plane,
|
||||
cl_uint num_entries,
|
||||
VAImageFormat* va_api_formats,
|
||||
cl_uint* num_surface_formats);
|
||||
VAImageFormat *va_api_formats,
|
||||
cl_uint *num_surface_formats);
|
||||
|
||||
typedef clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t *
|
||||
clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn ;
|
||||
|
@ -77,8 +77,8 @@ clGetSupportedVA_APIMediaSurfaceFormatsINTEL(
|
|||
cl_mem_object_type image_type,
|
||||
cl_uint plane,
|
||||
cl_uint num_entries,
|
||||
VAImageFormat* va_api_formats,
|
||||
cl_uint* num_surface_formats) ;
|
||||
VAImageFormat *va_api_formats,
|
||||
cl_uint *num_surface_formats) ;
|
||||
|
||||
#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
@ -123,11 +123,11 @@ typedef cl_int CL_API_CALL
|
|||
clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
void *media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices);
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices);
|
||||
|
||||
typedef clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t *
|
||||
clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -136,9 +136,9 @@ typedef cl_mem CL_API_CALL
|
|||
clCreateFromVA_APIMediaSurfaceINTEL_t(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
VASurfaceID *surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret);
|
||||
cl_int *errcode_ret);
|
||||
|
||||
typedef clCreateFromVA_APIMediaSurfaceINTEL_t *
|
||||
clCreateFromVA_APIMediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -147,10 +147,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueAcquireVA_APIMediaSurfacesINTEL_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueAcquireVA_APIMediaSurfacesINTEL_t *
|
||||
clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -159,10 +159,10 @@ typedef cl_int CL_API_CALL
|
|||
clEnqueueReleaseVA_APIMediaSurfacesINTEL_t(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event);
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event);
|
||||
|
||||
typedef clEnqueueReleaseVA_APIMediaSurfacesINTEL_t *
|
||||
clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2;
|
||||
|
@ -173,37 +173,37 @@ extern CL_API_ENTRY cl_int CL_API_CALL
|
|||
clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
void *media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
cl_device_id *devices,
|
||||
cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromVA_APIMediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
VASurfaceID *surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_2;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
const cl_mem *mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_API_SUFFIX__VERSION_1_2;
|
||||
const cl_event *event_wait_list,
|
||||
cl_event *event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
|
||||
|
||||
|
|
|
@ -343,12 +343,14 @@ int main(int argc, char **argv) {
|
|||
case 0: // UID
|
||||
if (!strncmp(argv[optind], "0x", 2) || !strncmp(argv[optind], "0X", 2)) {
|
||||
if (strlen(argv[optind]) != 2 + 8) {
|
||||
printf("Error: invalid UID length\n"); usage(argv[0]);
|
||||
printf("Error: invalid UID length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
uid = (uint32_t) rev32(hexreversetoulong(argv[optind] + 2));
|
||||
} else {
|
||||
if (strlen(argv[optind]) != 8) {
|
||||
printf("Error: invalid UID length\n"); usage(argv[0]);
|
||||
printf("Error: invalid UID length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
uid = (uint32_t) rev32(hexreversetoulong(argv[optind]));
|
||||
}
|
||||
|
@ -357,12 +359,14 @@ int main(int argc, char **argv) {
|
|||
case 1: // nR1
|
||||
if (!strncmp(argv[optind], "0x", 2) || !strncmp(argv[optind], "0X", 2)) {
|
||||
if (strlen(argv[optind]) != 2 + 8) {
|
||||
printf("Error: invalid nR1 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid nR1 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
nR1 = (uint32_t) rev32(hexreversetoulong(argv[optind] + 2));
|
||||
} else {
|
||||
if (strlen(argv[optind]) != 8) {
|
||||
printf("Error: invalid nR1 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid nR1 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
nR1 = (uint32_t) rev32(hexreversetoulong(argv[optind]));
|
||||
}
|
||||
|
@ -370,7 +374,8 @@ int main(int argc, char **argv) {
|
|||
|
||||
case 2: // aR1
|
||||
if (strlen(argv[optind]) != 8) {
|
||||
printf("Error: invalid aR1 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid aR1 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
aR1 = (uint32_t) strtoul(argv[optind], NULL, 16);
|
||||
break;
|
||||
|
@ -378,12 +383,14 @@ int main(int argc, char **argv) {
|
|||
case 3: // nR2
|
||||
if (!strncmp(argv[optind], "0x", 2) || !strncmp(argv[optind], "0X", 2)) {
|
||||
if (strlen(argv[optind]) != 2 + 8) {
|
||||
printf("Error: invalid nR2 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid nR2 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
nR2 = (uint32_t) rev32(hexreversetoulong(argv[optind] + 2));
|
||||
} else {
|
||||
if (strlen(argv[optind]) != 8) {
|
||||
printf("Error: invalid nR2 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid nR2 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
nR2 = (uint32_t) rev32(hexreversetoulong(argv[optind]));
|
||||
}
|
||||
|
@ -391,7 +398,8 @@ int main(int argc, char **argv) {
|
|||
|
||||
case 4: // aR2
|
||||
if (strlen(argv[optind]) != 8) {
|
||||
printf("Error: invalid aR2 length\n"); usage(argv[0]);
|
||||
printf("Error: invalid aR2 length\n");
|
||||
usage(argv[0]);
|
||||
}
|
||||
aR2 = (uint32_t) strtoul(argv[optind], NULL, 16);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue